Usage
Output (Piping) Cookies
cookies.txt Format (curl, wget)
You can output cookies in Netscape “cookies.txt” format and pipe them to curl or wget.
Using curl:
In this example, gateau will output cookies from Firefox in Netscape format, and curl will import those which match the requested domains and use them for the request.
Using wget:
In this example, gateau will output cookies from Chrome in Netscape format, and wget will import those which match the requested domains and use them for the request.
httpie Sessions
Output cookies in httpie session format (experimental).
Using httpie:
In this example, gateau will output cookies from Firefox in httpie session format, and httpie will import it as an anonymous session.
Saving named sessions:
Browser Session
Create a browser session within a new context and export the cookies after the session termination.
Example:
Wrapping Commands
Wrap commands (curl, wget, httpie) to import cookies directly.
Example with curl:
This will wrap the command curl https://example.com
and import cookies for the request.
Example with httpie:
This will wrap the command http GET https://example.com
and import cookies for the request.
Piping vs Wrapping
Piping with Process Substitution
Piping is flexible and secure but requires a shell that supports process substitution.
Example:
Wrapping
Wrapping avoids the need for process substitution and temporary files but is limited to supported commands.
Example:
Bypass Database File Locking
Use the --bypass-lock
flag to bypass database file locking (not recommended).
Example: