6. Cookie jar support #8

Closed
opened 2026-05-20 15:30:59 -06:00 by ppreeper · 0 comments
Owner

Description

Implement --cookie-jar to pass cookies to Chrome for authenticated page rendering.

Tasks

  • Parse Netscape cookie jar format from --cookie-jar <file>
  • Convert to Chrome JSON cookie file format
  • Write temp cookie file
  • Pass to Chrome via --cookies-file
  • Clean up temp cookie file after Chrome exits
  • Handle missing cookie jar file with exit code 4

Acceptance Criteria

  • Netscape format cookies parsed correctly (domain, path, name, value, expiry, secure, httponly)
  • Chrome JSON format written correctly
  • Temp file cleaned up after execution (even on error)
  • Missing cookie jar file exits with code 4
  • Cookies available to Chrome during page load

Notes

  • Netscape format: domain\tflag\tpath\tsecure\texpiration\tname\tvalue
  • Chrome JSON: array of objects with name, value, domain, path, expirationDate, secure, httpOnly
  • Use tempfile module for temp file creation
  • Relates to PRD #2
## Description Implement `--cookie-jar` to pass cookies to Chrome for authenticated page rendering. ## Tasks - [ ] Parse Netscape cookie jar format from `--cookie-jar <file>` - [ ] Convert to Chrome JSON cookie file format - [ ] Write temp cookie file - [ ] Pass to Chrome via `--cookies-file` - [ ] Clean up temp cookie file after Chrome exits - [ ] Handle missing cookie jar file with exit code 4 ## Acceptance Criteria - Netscape format cookies parsed correctly (domain, path, name, value, expiry, secure, httponly) - Chrome JSON format written correctly - Temp file cleaned up after execution (even on error) - Missing cookie jar file exits with code 4 - Cookies available to Chrome during page load ## Notes - Netscape format: `domain\tflag\tpath\tsecure\texpiration\tname\tvalue` - Chrome JSON: array of objects with `name`, `value`, `domain`, `path`, `expirationDate`, `secure`, `httpOnly` - Use `tempfile` module for temp file creation - Relates to PRD #2
Sign in to join this conversation.
No labels
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
ppreeper/wkhtmltopdf#8
No description provided.