#Chrome driver with proxy

11 messages · Page 1 of 1 (latest)

narrow moss
#

hey,

can anyone help me to code the following? I want to open the chrome driver though a proxy (user:pass@ip:port).
After trying a few things i failed, so i decided to ask for help here, and would be really thankfull if anyone would help out.

from selenium import webdriver
PROXY = ""
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)
chrome = webdriver.Chrome(chrome_options=chrome_options)
chrome.get("https://www.google.com")```

Something like that should work? Or how to solver that
scarlet finch
#

What is I want to open the chrome driver though a proxy (user:pass@ip:port). supposed to mean? You just want the browser to use a proxy?

narrow moss
#

So that the code is opening the chrome driver -> goes on a website using a proxy

#

So that every time i execute the code it goes on the website with a new IP

scarlet finch
#

Code looks ok

narrow moss
#

but i think that that code is also not for user:pass@ip:port proxies

reef belfry
#

you can check this thread