dataquestio / project-walkthroughs

Data science, machine learning, and web development project code for https://www.youtube.com/c/Dataquestio .
954 stars 1.11k forks source link

IndexError: list index out of range #22

Open esanchezmex opened 10 months ago

esanchezmex commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

Facing the same issue, Any update?

priyankaChoudhary7 commented 9 months ago

facing the same issue, pls suggest

seankwon123 commented 2 months ago

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