I have to use undetected chromdriver for some websites, but I also need to add a proxy with authorization. The usual ways that work with regular chromdriver don't work with undetected. What I have tried:
1:
from seleniumwire import webdriver
import undetected_chromedriver as uc
options = webdriver.ChromeOptions()
seleniumwire_options = {'proxy': {'https': 'type://username:pass@host:port'}}
driver = uc.Chrome(use_subprocess=True, seleniumwire_options=seleniumwire_options)
2:
import undetected_chromedriver as uc
options = uc.ChromeOptions
options.add_argument("--proxy-server=https://username:pass@host:port")
driver = uc.Chrome(use_subprocess=True, options=options)
Are there other ways that work with undetected chromedriver? Thanks in advance
source https://stackoverflow.com/questions/75189180/how-to-add-proxy-with-auth-to-ubdetected-chromdriver
Comments
Post a Comment