6_7 selenium使用代理IP

yanghui0 2020-06-20

""""""

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‘)

相关推荐