Python browser emulator with JS support [closed]

醉酒当歌 提交于 2019-11-27 01:43:16

问题


I want to grab some data from a site. Usually I use mechanize for such things, but now the site gives the data with JS. Alas, mechanize doesn't support it.

What can I use instead?


回答1:


Here are some options:

  1. Selenium (tutorial)
    • For headless automation, Selenium can be used in conjunction with PhantomJS
  2. WebKit
  3. Spidermonkey

Here are some code examples:

  • PyQt4 + WebKit
  • An example using PyQt4+WebKit, and redone with Selenium


来源:https://stackoverflow.com/questions/21777306/python-browser-emulator-with-js-support

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!