I'm trying to implement proxy configuration in firefox via selenium but when I open the page, setup works. Here is the test I did to access a site that verifies the ip.
profile = webdriver.FirefoxProfile()
profile.set_preference('general.useragent.override', random.choice(uas))
profile.set_preference("network.proxy.type", 1)
profile.set_preference("network.proxy.http",PROXY_HOST)
profile.set_preference("network.proxy.http_port",int(PROXY_PORT))
driver = webdriver.Firefox(firefox_profile=profile)
driver.set_page_load_timeout(30)
try:
driver.get('https://httpbin.org/ip')
time.sleep(30)
driver.quit()
except:
driver.quit()
Could you help me solve this problem? Is the configuration I made wrong? Thanks in advance!