You can run the tool as a Python module or via its standalone console script. By default, it outputs cookies as JSON to stdout, but you can also specify an output file in Netscape Cookie File Format.
Usage:
python -m pycookiecheat [OPTIONS] URL
$ python -m pycookiecheat --help
usage: pycookiecheat [-h] [-b BROWSER] [-p FIREFOX_PROFILE] [-o OUTPUT_FILE]
[-v] [-c COOKIE_FILE] [-V] url
Copy cookies from Chrome or Firefox and output as json
positional arguments:
url
options:
-h, --help show this help message and exit
-b BROWSER, --browser BROWSER
-p FIREFOX_PROFILE, --firefox-profile FIREFOX_PROFILE
Subdirectory name (or glob pattern) of the Firefox
profile to search for cookies (e.g.,
ashu3ae.default) -- if none given it will find the
configured default profile. Unused for non-Firefox
browsers
-o OUTPUT_FILE, --output-file OUTPUT_FILE
Output to this file in netscape cookie file format
-v, --verbose Increase logging verbosity (may repeat), default is
`logging.ERROR`
-c COOKIE_FILE, --cookie-file COOKIE_FILE
Cookie file
-V, --version show program's version number and exit