您需要设置所需的功能或浏览器配置文件,如下所示:
profile = webdriver.FirefoxProfile()profile.set_preference("network.proxy.type", 1)profile.set_preference("network.proxy.http", "proxy.server.address")profile.set_preference("network.proxy.http_port", "port_number")profile.update_preferences()driver = webdriver.Firefox(firefox_profile=profile)


