Как реализовать настройку, заданную ниже, для браузера без Phantomjs.
def browser():
print("Setting up webdriver connection...")
global driver
if driver is None:
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
profile.set_preference("network.proxy.type",1)
profile.set_preference("network.proxy.http","web-proxy.xxxx.xx.com")
profile.set_preference("network.proxy.https","web-proxy.xxxx.xx.com")
profile.set_preference("network.proxy.ssl","web-proxy.xxxx.xx.com")
profile.set_preference("network.proxy.http_port",8080)
profile.set_preference("network.proxy.https_port",8080)
profile.set_preference("network.proxy.ssl_port",8080)
profile.update_preferences()
driver = webdriver.Firefox(firefox_profile=profile)
driver.maximize_window()
yield driver
driver.quit()
Я использую Python 2.7, Селен 3.0 и фантомы 1.9.7.