## Problem Codeforces submit was a stub. CSES submit re-ran the full login flow on every invocation (~1.5s overhead). ## Solution **Codeforces**: headless browser submit via StealthySession (same pattern as AtCoder). Solves Cloudflare Turnstile on login, uploads source via file input, caches cookies at `~/.cache/cp-nvim/codeforces-cookies.json` so repeat submits skip login. **CSES**: persist the API token in credentials via a `credentials` ndjson event. Subsequent submits validate the cached token with a single GET before falling back to full login. Also includes a vimdoc table of contents.
9 lines
195 B
Python
9 lines
195 B
Python
HTTP_TIMEOUT = 15.0
|
|
|
|
BROWSER_SESSION_TIMEOUT = 15000
|
|
BROWSER_NAV_TIMEOUT = 10000
|
|
BROWSER_TURNSTILE_POLL = 5000
|
|
BROWSER_ELEMENT_WAIT = 10000
|
|
BROWSER_SETTLE_DELAY = 500
|
|
|
|
SUBMIT_POLL_TIMEOUT = 30.0
|