## Problem After the initial CodeChef implementation, submit silently swallowed "contest not available for submission" errors, and the submit flow used blind `wait_for_timeout` delays. AtCoder had an unnecessary 500ms settle delay after file upload. ## Solution Replace the initial page-load sleep in CodeChef submit with `wait_for_selector`, replace the 3s post-click sleep with a proper `wait_for_selector` on the result dialog, and extend the practice fallback check to catch both dialog variants. Remove AtCoder's `BROWSER_SETTLE_DELAY` and the constant from `timeouts.py`.
13 lines
407 B
Python
13 lines
407 B
Python
from collections import defaultdict
|
|
|
|
HTTP_TIMEOUT = 15.0
|
|
|
|
BROWSER_SESSION_TIMEOUT = 15000
|
|
BROWSER_NAV_TIMEOUT = 10000
|
|
BROWSER_SUBMIT_NAV_TIMEOUT: defaultdict[str, int] = defaultdict(
|
|
lambda: BROWSER_NAV_TIMEOUT
|
|
)
|
|
BROWSER_SUBMIT_NAV_TIMEOUT["atcoder"] = BROWSER_NAV_TIMEOUT * 2
|
|
BROWSER_SUBMIT_NAV_TIMEOUT["codeforces"] = BROWSER_NAV_TIMEOUT * 2
|
|
BROWSER_TURNSTILE_POLL = 5000
|
|
BROWSER_ELEMENT_WAIT = 10000
|