fix(codeforces): persist cookies after submit regardless of name (#312)
## Problem The submit path in `codeforces.py` guarded `cookie_cache.write_text` on the presence of a `JSESSIONID` cookie. Codeforces does not use `JSESSIONID`, so the cookie file was never written after submit, breaking the fast-path on subsequent submits. ## Solution Replace the name-specific guard with a non-empty check (`if browser_cookies:`), matching the unconditional save already used in the login path. Closes #301.
This commit is contained in:
parent
2c119774df
commit
924601ce99
1 changed files with 1 additions and 1 deletions
|
|
@ -550,7 +550,7 @@ def _submit_headless(
|
|||
|
||||
try:
|
||||
browser_cookies = session.context.cookies()
|
||||
if any(c["name"] == "JSESSIONID" for c in browser_cookies):
|
||||
if browser_cookies:
|
||||
cookie_cache.write_text(json.dumps(browser_cookies))
|
||||
except Exception:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue