【发布时间】:2021-11-09 09:34:37
【问题描述】:
我正在尝试使用 Lighthouse 打开默认网络浏览器 Chrome,而不是无头浏览器,因为我需要登录我的 Google 帐户。
--chrome-flags 传递给 Chrome 的自定义标志(空格分隔)。
检查下面的链接以了解 --chrome-flags。
https://github.com/GoogleChrome/lighthouse
stream = os.popen('lighthouse --chrome-flags="--headless"--disable-storage-reset="true" --preset=' +
preset + ' --output=json --output-path='+relative_path + name+'_'+getdate+'.report.json ' + url)
如何更改“--chrome-flags”以打开我已安装的 Chrome 应用,而不是一个无头应用?
【问题讨论】:
标签: python python-3.x google-chrome automation lighthouse