6_7 selenium使用代理IP

""""""

from selenium import webdriver

driver_path = r"D:\install\chromedriver\chromedriver.exe"
options = webdriver.ChromeOptions()
options.add_argument("--proxy-server=http://代理IP:31032")

driver = webdriver.Chrome(executable_path=driver_path, options=options)

driver.get(‘http://httpbin.org/ip‘)

相关推荐