[Python] Python/selenium how to use proxy with undetected-chromedriver

Discussão em 'Python' iniciado por Stack, Julho 31, 2025.

  1. Stack

    Stack Membro Participativo

    whenever I try to use a proxy with undetedted-chromedriver, it just doesn't work and diplays my ip. When I use the normal webdriver, it works perfectly.

    from selenium import webdriver
    from time import sleep


    ip_port = "ip:port"

    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_argument('--proxy-server=%s' % ip_port)
    driver = uc.Chrome(use_subprocess=True, chrome_options=chrome_options)

    driver.get('https://www.myexternalip.com/raw')
    sleep(999)


    How can I make the proxy work with undetected chromedriver?

    This is the site https://www.myexternalip.com/raw : With undetected chromedriver (gives my actual ip)

    [​IMG]

    Thanks for your help.

    Continue reading...

Compartilhe esta Página