-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 #3
Comments
I have the same issue when I try to run it
IndexError Traceback (most recent call last) IndexError: list index out of range |
@SangeethsivanSivakumar @celestinoxp Please share whole code |
Hey @celestinoxp @VikParuchuri @SangeethsivanSivakumar , did you manage to fix this problem? I'm having trouble with it right now |
I think I have fixed it! Where the For-Statement is, the author has put in a time.sleep(5) for the delay ( to stop the web server from booting you for web scraping). 5sec is not sufficient to stop the webserver from booting you. change it to 15sec. Makes the code VERY VERY slow (took over 10mins to complete the code) , but it will work. I might try using an IP Randomiser later to try and speed it up a little. But changing the 5sec to 15sec will fix it! |
@scarecrow165 still facing the same problem |
Hi,
scrape is not working. i use python 3.9 on windows 11. Can you help?
IndexError Traceback (most recent call last)
Input In [19], in <cell line: 2>()
3 data = requests.get(standings_url)
4 soup = BeautifulSoup(data.text)
----> 5 standings_table = soup.select('table.stats_table')[0]
7 links = [l.get("href") for l in standings_table.find_all('a')]
8 links = [l for l in links if '/squads/' in l]
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: