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‘)
5.环境变量配置在linux系统下,需要将可执行文件配置到环境变量或将文件移动到属于环境变量的目录里面方法一:将文件移动到属于环境变量目录中sudo mv chromedriver /user/bin