Extracting tags from a HTML with data hidden using python -
i'm trying learn scraping different webpages. tried scrape data page containing tabs follows:
url = "https://www.bc.edu/bc-web/schools/mcas/departments/art/people/#par-bc_tabbed_content-tab-0" page = requests.get(url) content = page.content tree = html.fromstring(page.content) soup = beautifulsoup(content,"html.parser") p = soup.find_all('div',{"id":'e6bde0e9_358d_4966_8fde_be96e9dcad0b'}) print p
this returns empty result though inspecting element displays content source page doesn't display data. pointers on how extract content.
this because of javascript rendering, means data want doesn't come original request, requests generated javascript of response.
to check requests generated original request, you'll have use developer tools
in chrome.
for particular case actual request need site, give information need.
wiki
Comments
Post a Comment