dont use fetcher when browsersteps are defined

puppeteer-fixes
dgtlmoon 2 years ago
parent de0f35701d
commit fc4bee57b3

@ -399,17 +399,23 @@ class base_html_playwright(Fetcher):
current_include_filters=None, current_include_filters=None,
is_binary=False): is_binary=False):
if os.getenv('USE_EXPERIMENTAL_PUPPETEER_FETCH'): # For now, USE_EXPERIMENTAL_PUPPETEER_FETCH is not supported by watches with BrowserSteps (for now!)
# Temporary backup solution until we rewrite the playwright code has_browser_steps = self.browser_steps and list(filter(
return self.run_fetch_browserless_puppeteer( lambda s: (s['operation'] and len(s['operation']) and s['operation'] != 'Choose one' and s['operation'] != 'Goto site'),
url, self.browser_steps))
timeout,
request_headers, if not has_browser_steps:
request_body, if os.getenv('USE_EXPERIMENTAL_PUPPETEER_FETCH'):
request_method, # Temporary backup solution until we rewrite the playwright code
ignore_status_codes, return self.run_fetch_browserless_puppeteer(
current_include_filters, url,
is_binary) timeout,
request_headers,
request_body,
request_method,
ignore_status_codes,
current_include_filters,
is_binary)
from playwright.sync_api import sync_playwright from playwright.sync_api import sync_playwright
import playwright._impl._api_types import playwright._impl._api_types

Loading…
Cancel
Save