Headless Browser for Python (Javascript support REQUIRED!) [closed]

时光总嘲笑我的痴心妄想 提交于 2019-11-26 10:15:58

I use webkit as a headless browser in Python via pyqt / pyside:
http://www.riverbankcomputing.co.uk/software/pyqt/download
http://developer.qt.nokia.com/wiki/Category:LanguageBindings::PySide::Downloads

I particularly like webkit because it is simple to setup. For Ubuntu you just use: sudo apt-get install python-qt4

Here is an example script:
http://webscraping.com/blog/Scraping-JavaScript-webpages-with-webkit/

Cecil Rodriguez

The answer to this question was Spynner

I'm in the midst of writing a Python driver for Zombie.js, "a lightweight framework for testing client-side JavaScript code in a simulated environment".

I'm currently at a standstill on a resolution to a bug in Node.js (before I write more tests and more code), but feel free to keep an eye on my project as it progresses:

https://github.com/ryanpetrello/python-zombie

There are not too many headless browsers yet that support Javascript.

You could try Zombie.js or Phantomjs. Those are not Python, but plain Javascript and those really can do the job.

Try using phantomjs, it has great javascript support. Then you could run it as a subprocess of a python script

http://docs.python.org/library/subprocess.html

that could boss it around.

You can use HTQL in combination with IRobotSoft webscraper. Check here for examples: http://htql.net/

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