cp.nvim/scrapers
Barrett Ruth 57f57f931f
fix(usaco): fix login field, submit endpoint, form parsing, and lang match
Problem: Login used `user=` field (correct is `uname=`) and checked for
`"success"` key in response (USACO returns `{"code":1}`). Submit used
the wrong endpoint, wrong file field name (`sub_file[]` vs `sourcefile`),
had an off-by-one in hidden field extraction (`group(2)` vs `group(1)`),
and `_pick_lang_option` matched C++11 before C++17 due to iterating
options before keywords. Login fast path also accepted stale cookies
with wrong credentials.

Solution: Fix `uname` field and `code==1` check. Fix submit to
`submit-solution.php`, `sourcefile` field, and `group(1)`. Invert
`_pick_lang_option` loop order (keywords outer, options inner) so
specific keywords like `"c++17"` match before `"c++"`. Remove fast
path from login subcommand so credentials are always validated.
2026-03-06 12:29:31 -05:00
..
__init__.py lol 2025-09-24 21:23:06 -04:00
atcoder.py feat(commands): implement :CP open [problem|contest|standings] (#319) 2026-03-05 19:16:05 -05:00
base.py feat: validate credentials on :CP <platform> login (#310) 2026-03-05 15:12:09 -05:00
codechef.py feat: implement login and submit for USACO, Kattis, and CodeChef (#325) 2026-03-06 00:09:16 -05:00
codeforces.py feat(commands): implement :CP open [problem|contest|standings] (#319) 2026-03-05 19:16:05 -05:00
cses.py feat(commands): implement :CP open [problem|contest|standings] (#319) 2026-03-05 19:16:05 -05:00
kattis.py fix(kattis): fix login, language ID, and submit path 2026-03-06 12:00:38 -05:00
language_ids.py fix(kattis): fix login, language ID, and submit path 2026-03-06 12:00:38 -05:00
models.py feat(commands): implement :CP open [problem|contest|standings] (#319) 2026-03-05 19:16:05 -05:00
timeouts.py fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
usaco.py fix(usaco): fix login field, submit endpoint, form parsing, and lang match 2026-03-06 12:29:31 -05:00