Selenium Webdriver how to use a proxy like ip:port:log:pass?
I tried to work with a public proxy, but I need uptime 24/7 and high speed. I bought a proxy with a logpass, but I do not know how to cram them. If the code just inserts them in the ip:port location, then when you go to 2ip.ru the screen shows me that the IP is not a proxy, but mine. How to fix it? Code below
( часть выше вставлять не решил, ибо там много мусора )
PROXY = "ip:port:log:pass"
webdriver.DesiredCapabilities.CHROME['proxy']={
"httpProxy":PROXY,
"ftpProxy":PROXY,
"sslProxy":PROXY,
"noProxy":None,
"proxyType":"MANUAL",
"autodetect":False
}
driver_options = Options()
driver_options.add_argument('--headless')
driver_options.add_argument('--disable-gpu')
driver = webdriver.Chrome(r'.\chromedriver', options=driver_options, service_args=["--verbose", "--log-path=D:\\qc1.log"])
driver.get('http://2ip.ru')
time.sleep(5)
driver.save_screenshot("screenshot.png")
1