我曾经在chrome上设置代理,就像下面的代码一样,但是当我更新到selenium 3.8.1代理停止工作时,我没有得到任何错误,它只是不使用代理服务器,我不知道为什么。我的chromedriver也是最新的。
options = webdriver.ChromeOptions()
options.add_argument('--proxy-server=192.99.55.120:3128')
driver = webdriver.Chrome(executable_path='C:\chromedriver_win32\chromedriver.exe', chrome_options=options)
driver.get("http://google.com/")
字符串
希望收到任何建议,也许是另一种方式来设置代理的chromedriver。
3条答案
按热度按时间5f0d552i1#
如果有人仍然感兴趣,这是我如何终于解决了这个问题
字符串
ulmd4ohb2#
尝试
字符串
我也可以直接用这些参数运行你的chrome二进制文件,看看它是否能正常工作
型
rm5edbpk3#
如果导航器询问代理的凭据用户名和密码,您需要处理此问题:(仅当警报出现时)
字符串