diff --git a/scrapers/codeforces.py b/scrapers/codeforces.py index 75d9915..2335da7 100644 --- a/scrapers/codeforces.py +++ b/scrapers/codeforces.py @@ -21,6 +21,7 @@ from .models import ( from .timeouts import ( BROWSER_NAV_TIMEOUT, BROWSER_SESSION_TIMEOUT, + BROWSER_SUBMIT_NAV_TIMEOUT, HTTP_TIMEOUT, ) @@ -396,7 +397,7 @@ def _submit_headless( try: page.wait_for_url( lambda url: "/my" in url or "/status" in url, - timeout=BROWSER_NAV_TIMEOUT * 2, + timeout=BROWSER_SUBMIT_NAV_TIMEOUT, ) except Exception: err_el = page.query_selector("span.error") diff --git a/scrapers/timeouts.py b/scrapers/timeouts.py index a21ad0d..8a002a2 100644 --- a/scrapers/timeouts.py +++ b/scrapers/timeouts.py @@ -2,6 +2,7 @@ HTTP_TIMEOUT = 15.0 BROWSER_SESSION_TIMEOUT = 15000 BROWSER_NAV_TIMEOUT = 10000 +BROWSER_SUBMIT_NAV_TIMEOUT = BROWSER_NAV_TIMEOUT * 2 BROWSER_TURNSTILE_POLL = 5000 BROWSER_ELEMENT_WAIT = 10000 BROWSER_SETTLE_DELAY = 500