如果我想传递参数给选项,我尝试使用seleniumwire连接到一个网站,这是正确的方式吗?因为它不适合我在代理部分旁边。
我希望浏览器是隐藏的,所有的错误,我得到的USB应该隐藏。
[14112:12440:0819/163127.876:ERROR:device_event_log_impl.cc(214)] [16:31:27.876] USB: usb_service_win.cc:201 Failed to get device address: Element not found. (0x490)
[14112:12440:0819/163127.880:ERROR:device_event_log_impl.cc(214)] [16:31:27.880] Bluetooth: bluetooth_adapter_winrt.cc:1073 Getting Default Adapter failed.在这里我的选择
options = {
'proxy': {
'http': 'http://' + proxy_user + ':' + proxy_pass + '@' + proxy_url + ':' + proxy_port,
'https': 'https://' + proxy_user + ':' + proxy_pass + '@' + proxy_url + ':' + proxy_port,
'no_proxy': 'localhost,127.0.0.1' # excludes
},
'add_experimental_option': {
'excludeSwitches': 'enable-logging'
},
'add_argument': '-headless'
}发布于 2021-09-18 03:12:03
你可以用这种方式传递论点。
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--ignore-certificate-errors-spki-list')
options.add_argument('--ignore-ssl-errors')https://stackoverflow.com/questions/68854245
复制相似问题