fix(codeforces): persist cookies after submit regardless of name
Problem: the submit path guarded `cookie_cache.write_text` on the presence of a `JSESSIONID` cookie, which Codeforces does not use. The file was therefore never written, breaking the fast-path on subsequent submits. Solution: replace the name-specific guard with a non-empty check so cookies are persisted whenever the browser session has any cookies, matching the unconditional save already used in the login path.
This commit is contained in:
parent
90337fab91
commit
f9c7b83b0e
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