Automatic Persistence
The simplest approach is automatic cookie persistence usingcookie_file:
automatic_persistence.py
Manual Cookie Management
For more control, useset_cookies() and get_cookies():
manual_cookie_management.py
Uploading Cookies
Upload cookies from an existing file:upload_cookies.py
Cookie File Format
Cookies must be a valid JSON array:Extracting Cookies
From Your Browser
Export cookies from your browser:extract_cookies_local.py
From a Notte Session
Extract cookies programmatically:extract_cookies_notte.py
Best Practices
Security
- Store cookie files securely outside version control
- Add
*.jsoncookie files to.gitignore - Rotate cookies regularly for sensitive services
- Use environment-specific cookie files
Maintenance
- Monitor cookie expiration dates
- Set up automated refresh for long-running systems
- Keep backup copies of valid cookies
Troubleshooting
Next Steps
Session Configuration
Configure sessions with all options
Browser Profiles
Persist full browser state
Vaults
Secure credential storage
Session Lifecycle
Manage session states

