I try to connect http://username:password@ip:port proxy and options.add_argument(f'--proxy-server=%s' % proxy)
not working. Can you help me?..
Asked
Active
Viewed 200 times
0

undetected Selenium
- 183,867
- 41
- 278
- 352

Женя Гапонюк
- 1
- 1
-
Does your proxy take form: `PROXY = "12.345.678.910:8080" chrome_options.add_argument('--proxy-server=%s' % PROXY)` – Chris Turgeon Dec 12 '20 at 17:54
1 Answers
0
To connect a proxy through ChromeDriver you can use the following code block:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
PROXY = "ip:port"
options = Options()
options.add_argument('--proxy-server=%s' % PROXY)
driver = webdriver.Chrome(options=options, executable_path=r'C:\path\to\chromedriver.exe')

undetected Selenium
- 183,867
- 41
- 278
- 352