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

爬虫主程序那里运行时出错 #1

Open
HideLakitu opened this issue Dec 7, 2019 · 2 comments
Open

爬虫主程序那里运行时出错 #1

HideLakitu opened this issue Dec 7, 2019 · 2 comments

Comments

@HideLakitu
Copy link

get_page那里,终端提示
self.pages = int(pages_search.findall(raw_result)[0])
IndexError: list index out of range

请问该怎么解决呢?

@Albert-W
Copy link
Owner

Albert-W commented Dec 7, 2019

原因在于首页没有顺利抓下来。
有两种可能,1是网络不流畅,导致抓取失败。2是网页缓存出问题。
建议,多试几次,或者 项目缓存清掉,重新启动。

@Albert-W
Copy link
Owner

Albert-W commented Dec 7, 2019

如何你修改了config中的主页,需要检查一下 正则表示式能不能抓取 page项。

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

2 participants