通过Python的灯塔报告

2024-05-19 18:48:35 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试用Lighthouse打开默认的网络浏览器Chrome,而不是一个无头浏览器,因为我需要登录到我的Google帐户

--要传递给chrome的chrome标志自定义标志(以空格分隔)。
查看下面的链接,了解--chrome标志
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标志”以打开已安装的chrome应用程序,而不是一个无头应用程序


Tags: path网络json应用程序output标志google浏览器