from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=http://171.37.135.94:8123')
chrome = webdriver.Chrome(chrome_options=chrome_options)
chrome.get('http://httpbin.org/ip') print(chrome.page_source)
chrome.quit()
selenium 设置代理的话,可以使用这种方式,代码是我刚才测试过的,亲测可用...
最新推荐文章于 2024-07-16 15:05:44 发布