Netcookie is a small Python script to generate standard cookie.txt files from various inputs such as Google Chrome (Application -> Cookies) to circumvent the need to install overly-permissive WebKit plugins to do the job.
git clone https://github.com/kinetechsolutions/netcookie.git
cd netcookie
pip install -r requirements.txt
Netscape style output to moz.txt
is achieved using Python's cookiejar.MozillaCookieJar()
class.
- Copy the output of Developer Tools (Application -> Cookies) to
chrome.txt
- Ensure the header row is present in the file
chrome.txt
. - Convert
name value domain path max_age size http_only secure same_site same_party priority
This will generate a cookies.txt
and a moz.txt
, you want to use moz.txt
for your application's purposes.
py chrome.py