fix(scrapers): cookie fast paths, centralized storage, and reauth hardening #363
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/cp.nvim!363
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/scraper-browser-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Scraper cookie handling was fragmented across per-platform files with no
shared access, httpx scrapers lacked
checking_loginfast paths onlogin, and several re-auth edge cases (CodeChef submit, CF cookie guard,
AtCoder cookie persistence) caused unnecessary full re-logins or silent
failures.
Solution
Centralize all cookie storage into a single
cookies.jsonvia helpersin
base.py. Addchecking_loginfast paths tokattis.py(using thex-usernameresponse header as a session probe),usaco.py, andcses.pylogin flows. Fixkattis.pysubmit to emitchecking_loginonly after loading cookies. Remove AtCoder cookie persistence from login
entirely — always do a fresh session. Harden CodeChef and CF reauth
with consistent status logging and cookie guard checks.