【发布时间】:2017-03-12 17:26:50
【问题描述】:
我正在通过 Selenium Python 脚本从 Chrome for YouTube 下载 HAR。 代码片段:
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--proxy-server={0}".format(url))
chrome_options.add_argument("--enable-quic")
self.driver = webdriver.Chrome(chromedriver,chrome_options = chrome_options)
self.proxy.new_har(args['url'], options={'captureHeaders': True})
self.driver.get(args['url'])
result = json.dumps(self.proxy.har, ensure_ascii=False)
我希望在下载 HAR 时使用 QUIC,但是当我通过 Wireshark Selenium 驱动程序查看数据包时仅使用 TCP。有没有办法强制 Chrome 驱动程序使用 QUIC?或者是否有 BMP 的替代品?
在这个问题How to capture all requests made by page in webdriver? Is there any alternative to Browsermob? 中已经向 Firefox 提出了类似的问题,并且有一个单独使用 Selenium 的解决方案,不需要任何 BMP。那么 Chrome 有可能吗?
【问题讨论】:
标签: python selenium-chromedriver browsermob-proxy quic