project-walkthroughs icon indicating copy to clipboard operation
project-walkthroughs copied to clipboard

IndexError: list index out of range

Open esanchezmex opened this issue 1 year ago • 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.

esanchezmex avatar Nov 09 '23 14:11 esanchezmex

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.

esanchezmex avatar Nov 09 '23 14:11 esanchezmex

Facing the same issue, Any update?

Goelprakhar21 avatar Nov 18 '23 18:11 Goelprakhar21

facing the same issue, pls suggest

priyankaChoudhary7 avatar Dec 14 '23 19:12 priyankaChoudhary7

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

seankwon123 avatar Jul 20 '24 17:07 seankwon123