Skip to content
Snippets Groups Projects
Commit 69b7d37f authored by SREERAM KEERTHAN PARUCHURU's avatar SREERAM KEERTHAN PARUCHURU
Browse files

beautiful soup

parent d35d38b3
No related branches found
No related tags found
No related merge requests found
import requests
from bs4 import BeautifulSoup
page = requests.get("http://dataquestio.github.io/web-scraping-pages/simple.html")
page
page.status_code
page.content
soup = BeautifulSoup(page.content, 'html.parser')
soup.prettify()
k=list(soup.children)
print([type(item) for item in list(soup.children)])
html = list(soup.children)[2]
body = list(html.children)[3]
print(body)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment