2

I am currently trying to use user:pass proxies in selenium in firefox, but the solution in the docs is not working

from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType

myProxy = "host:port"
Proxy({
    'proxyType': ProxyType.MANUAL,
    'httpProxy': myProxy,
    'ftpProxy': myProxy,
    'sslProxy': myProxy,
    'noProxy': '' # set this value as desired
    })

driver = webdriver.Firefox(r'''C:\Users\ben_s\Desktop\geckodriver''',proxy=proxy)
driver.get("https://www.ipchicken.com/")

Is there a way this code could be tweaked to make the proxy work? Or is there an entierly different method? Thanks

1

1 Answer 1

0

Check out selenium-wire as proposed by this answer here. It works nicely for me.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.