首页 > 如何使用python运行一个webkit核心加载某个页面,从而监控到页面的所有HTTP请求

如何使用python运行一个webkit核心加载某个页面,从而监控到页面的所有HTTP请求

主要是要执行页面里面的 javascript 代码,并且可以监控到发送的 HTTP 请求。

PS:需要服务器跑,所以不能像selenium一样 打开一个浏览器窗口


可以用PyQtWebKit,官方提供example。应该会有你想要的


I believe this is what you want: http://jeanphix.me/Ghost.py/


https://wiki.python.org/moin/PythonWebKit

The Python Webkit DOM Project makes python a full peer of javascript when it comes to accessing and manipulating the full features available to Webkit, such as HTML5. Everything that can be done with javascript, such as getElementsbyTagName and appendChild, event callbacks through onclick, timeout callbacks through window.setTimeout, and even AJAX using XMLHttpRequest, can also be done from python.

【热门文章】
【热门文章】