模拟浏览器的动机

  • JS动态渲染的页面不止Ajax一种
  • 很多网页的Ajax接口含有加密参数,分析其规律的成本过高

通过对浏览器运行方式的模拟,我们将做到:可见即可爬
Python中常用的模拟浏览器运行的库为Selenium和Splash

Splash

Selenium

Selenium是一个自动化测试工具,可以用来控制浏览器行为

  1. QuickStart:https://seleniumhq.github.io/selenium/docs/api/py/
  2. 完整文档:https://www.seleniumhq.org/docs/
  3. Python接口:https://seleniumhq.github.io/selenium/docs/api/py/api.html

常用接口:

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-03
  • 2022-01-17
  • 2022-12-23
  • 2021-05-02
  • 2022-12-23
相关资源
相似解决方案