Chrome devmode suddenly turning on in selenium

2019-01-25 00:40发布

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 Downloads\chromedriver_win32\chromedriver.exe', chrome_options=options)

And the output is:

[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.

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

1条回答
爷的心禁止访问
2楼-- · 2019-01-25 00:53

I managed to fix it finally :D

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

That was all it took.

查看更多
登录 后发表回答