用于与Google Chrome远程shell端口通信的客户端
项目描述
此库使得从Python与Google Chrome远程调试shell通信变得容易。为了使shell可用,使用以下选项启动Chrome
google-chrome --remote-shell-port=9222
然后您可以通过以下代码从Python进行连接
>>> import chrome_remote_shell >>> shell = chrome_remote_shell.open(port=9222) >>> shell.request('DevToolsService', command='ping') {u'data': u'ok', u'command': u'ping', u'result': 0}
该协议的详细信息请参见
http://code.google.com/p/chromedevtools/wiki/ChromeDevToolsProtocol
作为便利,shell连接对象提供了一种方法,通过向第一个标签页注入JavaScript,命令Chrome在新标签页中打开一个URL
shell.open_url('http://www.aldaily.com/')
变更日志
2009年2月26日。 添加了有条件的导入 simplejson,以便在Python 2.5下运行模块。
项目详情
关闭
chrome_remote_shell-1.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 694d672937341fa0318c710d5712f38357aac1e49d78f053595f7e3a1a7adb72 |
|
MD5 | c838e1692989cb1dd77b8603ecb7a81e |
|
BLAKE2b-256 | 913893602a05746810c4947544cb193dcd3d5017663df08b74687394c9d6677f |