作者goofi0211 (姑叔城外含三次)
看板Python
标题[问题] selenium搭配proxy报错
时间Thu Dec 14 00:24:18 2017
如题
以下程式码:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument('--proxy-server={0}'.format(proxies))
driver = webdriver.Chrome(executable_path=r'/Users/terry/chromedriver'
,chrome_options = chromeOptions)
driver.get("
https://lazypenweb.wordpress.com")
proxies变数里面存放的是我从免费代理网站的ip有确认是可以用的proxy
但浏览器就会报错
ERR_NO_SUPPORTED_PROXIES
是我哪里没设定或写错了妈?已经好几天了这问题都解决不了QQ
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 180.217.142.254
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1513182261.A.467.html
1F:推 ckc1ark: 先直接执行chrome代--proxy-server 看是不是这边就有出错 12/14 00:35
2F:→ goofi0211: 後来在测试只能连上http的网站https的网站都连不上 12/14 16:42