Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range #22

Open
esanchezmex opened this issue Nov 9, 2023 · 4 comments
Open

IndexError: list index out of range #22

esanchezmex opened this issue Nov 9, 2023 · 4 comments

Comments

@esanchezmex
Copy link

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
Copy link
Author

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.

@Goelprakhar21
Copy link

Facing the same issue, Any update?

@priyankaChoudhary7
Copy link

facing the same issue, pls suggest

@seankwon123
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants