6_7 selenium使用代理IP

 

 

 1 """"""
 2 
 3 from selenium import webdriver
 4 
 5 driver_path = r"D:\install\chromedriver\chromedriver.exe"
 6 options = webdriver.ChromeOptions()
 7 options.add_argument("--proxy-server=http://代理IP:31032")
 8 
 9 driver = webdriver.Chrome(executable_path=driver_path, options=options)
10 
11 driver.get('http://httpbin.org/ip')

 

posted @ 2020-06-20 23:10  udbful  阅读(183)  评论(0编辑  收藏  举报