from selenium import webdriver # 方法1 options = webdriver.ChromeOptions() ip = '190.2.151.210:40071' options.add_argument(f"--proxy-server=http://{ip}") driver = webdriver.Chrome(executable_path="./chromedriver.exe",chrome_options=options) # 2 options = webdriver.ChromeOptions() ip = '190.2.151.210:40071' desired_capabilities = webdriver.DesiredCapabilities.CHROME.copy() desired_capabilities['proxy'] = { "httpProxy": f'{ip}', "noProxy": None, "proxyType": "MANUAL", "class": "org.openqa.selenium.Proxy", "autodetect": False } driver = webdriver.Chrome(executable_path="./chromedriver.exe",chrome_options=options, desired_capabilities=desired_capabilities)
了解更多分析及数据抓取可查看:
http://cloud.yisurvey.com:9081/html/d8acf20b-342f-4806-8dcc-5e6a8d00881d.html?ly=csdn
特别说明:本文旨在技术交流,请勿将涉及的技术用于非法用途,否则一切后果自负。如果您觉得我们侵犯了您的合法权益,请联系我们予以处理。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)