Codied To Clipboard !
Home > Notes > Web Scrapping and BeautiFul Soup
Beautiful Soup is a Python package for parsing HTML and XML documents. It creates a parse tree for parsed pages that can be used to extract data from HTML, which is useful for web scraping.
import requests from bs4 import BeautifulSoup URL= "https://en.wikipedia.org/wiki/List_of_state_and_union_territo page = requests.get(URL) soup = BeautifulSoup(page.content,"html") #print(soup) get_title = soup.title print(get_title.text)
Beautiful Soup is a Python package for parsing HTML and XML documents. It creates a parse tree for parsed pages that can be used to extract data from HTML, which is useful for web scraping.
import requests from bs4 import BeautifulSoup URL= "https://en.wikipedia.org/wiki/List_of_state_and_union_territo page = requests.get(URL) soup = BeautifulSoup(page.content,"html") #print(soup) get_title = soup.title print(get_title.text)