Answers for "how to scrape data of a figure on a website python"

1

web scraper python

from requests import get
from requests.exceptions import RequestException
from contextlib import closing
from bs4 import BeautifulSoup
Posted by: Guest on August-09-2020
0

web scraper python

>>> from bs4 import BeautifulSoup
>>> raw_html = open('contrived.html').read()
>>> html = BeautifulSoup(raw_html, 'html.parser')
>>> for p in html.select('p'):
...     if p['id'] == 'walrus':
...         print(p.text)

'I am the walrus'
Posted by: Guest on August-09-2020

Code answers related to "how to scrape data of a figure on a website python"

Python Answers by Framework

Browse Popular Code Answers by Language