-
Notifications
You must be signed in to change notification settings - Fork 529
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
list index out of range #31
Comments
同样出现了越界问题 |
在request 函数 return response那里加个断点,这时候response.content 的值为 ...503 Service Temporarily Unanaliable..,说明访问流量过大,list是空的。 |
廖老师的网站有反爬技术,请求多了就给个503 |
在发送请求那儿加上个请求头就可以了 |
Traceback (most recent call last): File "crawler.py", line 163, in <module> crawler.run() File "crawler.py", line 90, in run for index, url in enumerate(self.parse_menu(self.request(self.start_url))): File "crawler.py", line 116, in parse_menu menu_tag = soup.find_all(class_="uk-nav uk-nav-side")[1]
The text was updated successfully, but these errors were encountered: