Problem: CSES `_web_login` did bare dict indexing on the API response, causing an opaque `KeyError` if fields were absent. `_check_token` swallowed all exceptions as `False`, treating transient network errors as invalid tokens. CF wrote cookies unconditionally (login and submit), and swallowed `_solve_turnstile` failures in `submit_action`. Solution: Replace direct indexing with `.get()` + `RuntimeError` for missing CSES API fields. Re-raise `httpx` network/timeout exceptions from `_check_token`. Guard CF cookie writes behind an `X-User-Handle` check (the CF auth cookie). Propagate `_solve_turnstile` errors so failures surface rather than silently proceeding. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atcoder.py | ||
| base.py | ||
| codechef.py | ||
| codeforces.py | ||
| cses.py | ||
| kattis.py | ||
| language_ids.py | ||
| models.py | ||
| timeouts.py | ||
| usaco.py | ||