feat(login): add checking_login fast path to httpx scrapers (kattis, usaco) #362

Closed
opened 2026-03-07 19:45:07 +00:00 by barrettruth · 0 comments
barrettruth commented 2026-03-07 19:45:07 +00:00

Problem

Browser scrapers (CF, AtCoder, CodeChef) now emit a checking_login status when valid cookies exist, letting the user see a fast path vs. a full re-login. httpx scrapers (Kattis, USACO) always emit logging_in on the login subcommand regardless of whether cookies exist, making their output inconsistent with browser scrapers.

Solution

Add a cookie fast path to kattis.py and usaco.py login: if cookies exist, verify the session with a lightweight authenticated request, emit checking_login on success, and only fall through to logging_in + full re-auth on failure. All scrapers should produce identical status event sequences for equivalent scenarios.

## Problem Browser scrapers (CF, AtCoder, CodeChef) now emit a `checking_login` status when valid cookies exist, letting the user see a fast path vs. a full re-login. httpx scrapers (Kattis, USACO) always emit `logging_in` on the login subcommand regardless of whether cookies exist, making their output inconsistent with browser scrapers. ## Solution Add a cookie fast path to `kattis.py` and `usaco.py` login: if cookies exist, verify the session with a lightweight authenticated request, emit `checking_login` on success, and only fall through to `logging_in` + full re-auth on failure. All scrapers should produce identical status event sequences for equivalent scenarios.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/cp.nvim#362
No description provided.