【发布时间】:2019-07-11 12:41:57
【问题描述】:
我正在尝试在 python 中使用带有 selenium 的代理,但我尝试过的方法都没有奏效,chrome 试图访问该网站但没有成功。 我正在使用来自https://free-proxy-list.net/的代理
executable_path = r"C:\Users\user\PycharmProjects\WebScrape\chromedriver75.exe"
proxy_address = "94.230.148.233:61576"
chrome_options = Options()
chrome_options.add_argument("--proxy-server=" + proxy_address)
driver = webdriver.Chrome(executable_path=executable_path, options=chrome_options)
driver.set_page_load_timeout(60)
driver.get("https://whatismyipaddress.com/")
我也尝试更改页面超时,但没有成功。
【问题讨论】:
标签: python selenium google-chrome proxy