selenium设置代理

# 设置option选项
options = webdriver.ChromeOptions()
options.add_argument('proxy-server=http://123.163.27.90:9999')

driver_path = r"D:\Google\Chrome\Application\chromedriver.exe"
driver = webdriver.Chrome(executable_path=driver_path, chrome_options=options)
driver.get('http://httpbin.org/ip')
发布了37 篇原创文章 · 获赞 18 · 访问量 1221

猜你喜欢

转载自blog.csdn.net/qq_41506882/article/details/104416332