selenium + chrome python 添加代理

chromeOptions = webdriver.ChromeOptions()
print(proxy)
chromeOptions.add_argument("'--proxy-server={}".format(proxy))
browser = webdriver.Chrome(chrome_options = chromeOptions)
browser.get("http://httpbin.org/ip")
time.sleep(3)
print(browser.page_source)
browser.quit()
posted @ 2017-12-19 18:47  御虫师  阅读(5316)  评论(1编辑  收藏  举报