cp.nvim/scrapers
Barrett Ruth ffd40564bc
fix(usaco): add proactive cookie validation to login and submit
Problem: `login()` always ran a fresh web login even with valid
cached cookies. `submit()` only checked cookie existence, not
validity, relying solely on a reactive retry after auth failure.
Auth redirect detection used `page_r.url.path` which could miss
non-path login redirects.

Solution: `login()` and `submit()` now load cookies and call
`_check_usaco_login()` upfront; re-login only if the check fails.
Auth detection in `_do_submit()` uses `str(page_r.url)` for a more
robust redirect match.
2026-03-07 02:20:20 -05:00
..
__init__.py lol 2025-09-24 21:23:06 -04:00
atcoder.py fix: codechef submit fixes and atcoder cleanup (#355) 2026-03-06 23:40:12 -05:00
base.py feat: validate credentials on :CP <platform> login (#310) 2026-03-05 15:12:09 -05:00
codechef.py fix: codechef submit fixes and atcoder cleanup (#355) 2026-03-06 23:40:12 -05:00
codeforces.py fix(login): remove cookie fast-path from login subcommand (#344) 2026-03-06 17:53:22 -05:00
cses.py fix(cses): add token fast path to login and improve error surfacing 2026-03-07 02:14:54 -05:00
kattis.py fix(kattis): emit checking_login at submit start for consistency 2026-03-07 02:19:54 -05:00
language_ids.py feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
models.py feat: race countdown support and language version selection (#346) 2026-03-06 18:18:21 -05:00
timeouts.py fix: codechef submit fixes and atcoder cleanup (#355) 2026-03-06 23:40:12 -05:00
usaco.py fix(usaco): add proactive cookie validation to login and submit 2026-03-07 02:20:20 -05:00