selnuim 设置代理

瘦欲@ 提交于 2019-11-28 21:45:44

测试代理地址网站:    http://httpbin.org/ip

from selenium.webdriver.chrome.options import Optionsfrom selenium import webdriverchrome_options = Options()## 一定要注意,=两边不能有空格,不能是这样--proxy-server = http://202.20.16.82:10152chrome_options.add_argument("--proxy-server=http://117.191.11.102:80")driver = webdriver.Chrome(executable_path=r'.\chromedriver.exe', chrome_options=chrome_options)url='http://httpbin.org/ip'driver.get(url)返回自己代理的ip地址
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!