Skip to content
Advertisement

Can’t get tags when scraping data

I am trying to scrape all tr tags using BeautifulSoup, but it returns none. Code:

JavaScript

Even though there are tr tags in this url, it returns none and throws an IndexError. Why is this happening?

Advertisement

Answer

In page source table is located inside comment. You need to extract comment content and then parse it as HTML:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement