Chrome devmode 在 selenium 中突然打开

问题描述

我每天都在使用脚本.这是一个无头 chrome,每 5 分钟检查一次站点,然后突然打开 devmode,我似乎无法将其关闭.这是我的脚本:

I am using a script daily. It's a headless chrome that just checks a site every 5 minutes and suddenly devmode turned on and i can't seem to turn it off. This is my script:

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('headless')
driver = webdriver.Chrome + 'E:Chrome Downloadschromedriver_win32chromedriver.exe', chrome_options=options)

输出是:

[0926/111600.894:ERROR:devtools_http_handler.cc(786)]
DevTools listening on 127.0.0.1:12107

[0926/111601.685:ERROR:browser_gpu_channel_host_factory.cc(103)] Failed to launch GPU process.

它还会在每次连接到新站点时输出 F12 开发者控制台信息.:c

It also spews out the F12 developer console info everytime it connects to a new site. :c


解决方案

我终于修好了 :D

options.add_argument('--log-level=3')

这就是全部.

相关文章