cp.nvim/scrapers
Barrett Ruth 13438beca7
fix(scrapers): browser login fast paths and AtCoder submit rewrite
Problem: CF and AtCoder always did a full browser login on every
`login` invocation, even with valid cookies. AtCoder submit never
persisted cookies, re-logging in on every submit. CF's cookie guard
used `X-User-Handle` (no longer set by CF — now `X-User-Sha1`),
so cookies were never saved. CF `login_action` was missing
`wait_for_selector` for the form that appears after the Cloudflare
gate reloads. AtCoder submit injected source via CodeMirror which
doesn't exist on AtCoder (it uses ACE editor).

Solution: Added cookie fast paths to CF and AtCoder login — emit
`checking_login` and return early if the existing session is valid.
`checking_login` is only emitted when cookies actually exist; fresh
starts go straight to `logging_in`. Fixed CF cookie guard to
`X-User-Sha1` and added `wait_for_selector` for the login form.
Rewrote AtCoder submit to use `set_input_files` on the real source
file path, with `wait_for_function` on `#plain-textarea` to confirm
the ACE editor populated before clicking submit.
2026-03-07 15:31:25 -05:00
..
__init__.py lol 2025-09-24 21:23:06 -04:00
atcoder.py fix(scrapers): browser login fast paths and AtCoder submit rewrite 2026-03-07 15:31:25 -05:00
base.py refactor(scrapers): centralize cookie storage into shared file 2026-03-07 03:46:28 -05:00
codechef.py fix(codechef): consistent submit logging and robust reauth handling 2026-03-07 03:46:43 -05:00
codeforces.py fix(scrapers): browser login fast paths and AtCoder submit rewrite 2026-03-07 15:31:25 -05:00
cses.py fix(scrapers): login fast paths and re-auth hardening for httpx platforms (#357) 2026-03-07 02:23:43 -05:00
kattis.py fix(scrapers): browser login fast paths and AtCoder submit rewrite 2026-03-07 15:31:25 -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 refactor(scrapers): centralize cookie storage into shared file 2026-03-07 03:46:28 -05:00