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

如果某网页比如循环下一页中 偶尔有时候会出现503等报错,当然多次刷新一般能打开 那么这种需要如何设计流程 或者判断 比如当出现特定信息时 重新刷新这个页面在爬取 或者找不到需要元素 有个重刷新机制 也就是问题不是需要时间来加载而是直接比如403 503等错误 #222

Closed
NaiboWang opened this issue Oct 14, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@NaiboWang
Copy link
Owner

          你好  这边咨询下 如果某网页比如循环下一页中 偶尔有时候会出现503等报错,当然多次刷新一般能打开 那么这种需要如何设计流程  或者判断 比如当出现特定信息时 重新刷新这个页面在爬取  或者找不到需要元素 有个重刷新机制 也就是问题不是需要时间来加载而是直接比如403 503等错误

Originally posted by @ahuyuhy in #100 (comment)

添加无限循环(如循环单个元素//body循环9999次),然后循环里添加条件判断检测是页面是否存在指定文本或元素,如果存在就添加自定义操作用JavaScript或者Python刷新页面,否则在另一个条件分支里添加自定义操作Break掉循环即可。

@ahuyuhy
Copy link

ahuyuhy commented Oct 14, 2023

收到 这边刚才也尝试了下 思路差不多 已经实现了功能 感谢师傅解答

@NaiboWang NaiboWang added documentation Improvements or additions to documentation example Use case of EasySpider and removed example Use case of EasySpider labels Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants