Selenium python chromedriver不会连接到代理

时间:2017-02-20 20:02:57

标签: python python-3.x selenium proxy

我正在尝试连接到代理,但是浏览器没有使用它,当我检查我的IP时,它是我自己的ip而不是代理。 我提供了一个虚假的IP,因为我的IP专用且私密。 这是我尝试过的:

chrome_options = Options()
chrome_options.add_argument('--proxy=https://23.23.23.23:19191'))
chrome_options.add_argument('--proxy-auth=user:password')
chrome_options.add_argument('--proxy-type=https')
driver = webdriver.Chrome(chrome_options = chrome_options)
driver.get("http://whatismyipaddress.com/")

另外,我如何在phantomjs上做到这一点?

0 个答案:

没有答案