Skip to content

对于动态表单的爬取 #93

Answered by Qianlitp
HomerQing asked this question in Q&A
Discussion options

You must be logged in to vote

简单看了下,第一次出现的用户名表单,crawlergo正确识别并点击了下一步,但后续的填密码就没有再触发了。这个你可以关闭headless看到过程。
对于这种表单,其实很难做通用化的处理,想了下思路:

  1. 只自动化填充可见的输入框,不可见或带有hidden关键字的输入框,不再自动填充
  2. 触发表单提交后,监听页面变化,检测到有表单新增、表单属性更改等,重复自动化表单填充和提交操作
  3. 设定步骤2的最大循环次数,防止卡死

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Qianlitp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants