# To install the Python client library:# pip install -U seleniumimport urllib.request from selenium.webdriver.common.proxy import * import os from selenium import webdriver PROXY = "172.XXX.194.XXX:80:reaper:jlK6xgZasdwdfdf"# Create a copy of desired capabilities object.desired_capabilities = webdriver.DesiredCapabilities.CHROME.copy() # Change the proxy properties of that copy.desired_capabilities['proxy'] = { "httpProxy":PROXY, "ftpProxy":PROXY, "sslProxy":PROXY, "noProxy":None, "proxyType":"MANUAL", "class":"org.openqa.selenium.Proxy", "autodetect":False} driver=webdriver.Chrome(desired_capabilities=desired_capabilities,executable_path='C:/forSelenium/chromedriver.exe') driver.get("https://chicago.craigslist.org/chc/hss/6210136955.html")
Wednesday, 12 July 2017
selenium chrome proxy # python
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment