cp.nvim/scrapers
Barrett Ruth eb0dea777e
fix(scrapers): login fast paths and re-auth hardening for httpx platforms (#357)
## Problem

On CSES, Kattis, and USACO, `:CP <platform> login` always prompted
for credentials and ran a full web login even when a valid session was
already cached. Submit also had weak stale-session detection.

## Solution

`credentials.lua` now tries cached credentials first before prompting,
delegating fast-path detection to each scraper. CSES `login()` checks
the cached API token and returns immediately if valid. USACO `login()`
and `submit()` call `_check_usaco_login()` upfront. Kattis `submit()`
emits `checking_login` consistently and also triggers re-auth on HTTP
400/403, not just on the `"Request validation failed"` text match.
The premature `Submitting...` log emitted by Lua before the scraper
started is removed — Python's own status events are sufficient.
2026-03-07 02:23:43 -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(scrapers): login fast paths and re-auth hardening for httpx platforms (#357) 2026-03-07 02:23:43 -05:00
kattis.py fix(scrapers): login fast paths and re-auth hardening for httpx platforms (#357) 2026-03-07 02:23:43 -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(scrapers): login fast paths and re-auth hardening for httpx platforms (#357) 2026-03-07 02:23:43 -05:00