dataquestio/project-walkthroughs

IndexError: list index out of range

esanchezmex opened this issue · 4 comments

This issue is related to footbal_matches, specifically the scraping part.

data = requests.get(standings_url)
soup = BeautifulSoup(data.text)
--> standings_table = soup.select('table.stats_table')[0]

IndexError: list index out of range

For the for loop for scrapping multiple years, I got an error saying I had to install html5lib, and once I did I stopped being able to scrape anything. I started getting this error, and now it is not just on the loop, but also earlier in the notebook when it is used by itself.

Without indexing it simply returns an empty list, and after playing around with the html attributes in case the html struture of the site had changed, it still will not work.

Facing the same issue, Any update?

facing the same issue, pls suggest

I have the same issue, I was assuming that it has to do with the web scraping security that the website has set up for itself.
https://www.sports-reference.com/bot-traffic.html