mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-12-07 01:58:17 +01:00
Add integration tests for requests with proxy param
This commit is contained in:
@@ -36,7 +36,7 @@ def get_flaresolverr_version() -> str:
|
||||
return FLARESOLVERR_VERSION
|
||||
|
||||
|
||||
def get_webdriver(proxyconf: dict=None) -> WebDriver:
|
||||
def get_webdriver(proxy: dict = None) -> WebDriver:
|
||||
global PATCHED_DRIVER_PATH
|
||||
logging.debug('Launching web browser...')
|
||||
|
||||
@@ -55,8 +55,8 @@ def get_webdriver(proxyconf: dict=None) -> WebDriver:
|
||||
options.add_argument('--ignore-certificate-errors')
|
||||
options.add_argument('--ignore-ssl-errors')
|
||||
|
||||
if proxyconf:
|
||||
proxy_url = proxyconf['url']
|
||||
if proxy and 'url' in proxy:
|
||||
proxy_url = proxy['url']
|
||||
logging.debug("Using webdriver proxy: %s", proxy_url)
|
||||
options.add_argument('--proxy-server=%s' % proxy_url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user