qtacore / chrome_master

A python client implementation of Chrome Devtools Procotol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chrome_master

A python client implementation of Chrome Devtools Procotol

USAGE

打开Chrome的调试开关,如:

PC端Chrome使用以下方式启动会打开调试端口9222

chrome --remote-debugging-port=9222

然后使用chrome_master操作Chrome

chrome_master = chrome_master.ChromeMaster(('localhost', 9222))
page_debugger = chrome_master.find_page(url=url, title=title)
page_debugger.register_handler(chrome_master.RuntimeHandler)

url = page_debugger.eval_script(None, 'location.href')

About

A python client implementation of Chrome Devtools Procotol


Languages

Language:Python 100.0%