Cookie Exporter | Netscape, JSON, Header

Export cookies in Netscape, JSON, or header format for curl, wget, yt-dlp — replaces Get cookies.txt LOCALLY

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

लेखक
piknockyou
दैनिक इंस्टॉल
0
एकूण इंस्टॉल
2
रेटिंग
0 0 0
आवृत्ती
3.0.9
बनवली
2026-07-22
अपडेट केली
2026-07-22
आकार
12.4 KB
License
AGPL-3.0
यांवर लागू होते:
सर्व संकेतस्थळे

☕ If you find this tool helpful & would like to support its maintenance, please consider leaving a tip on:

https://ko-fi.com/piknockyou

Thank you! :-)


🖼 For a quick impression of this script, refer to the screenshots at the bottom.


Cookie Exporter | Netscape, JSON, Header

Exports browser cookies in Netscape, JSON, or header format — compatible with curl, wget, yt-dlp, aria2, HTTPie, and more.

Replaces Get cookies.txt LOCALLY — no browser extension needed, works entirely through your userscript manager.

Why You Need This

Downloading authenticated content requires valid cookies. Dedicated cookie extensions exist, but they add another icon to your toolbar, another permission to manage, and another update to track. This script uses your userscript manager's built-in GM_cookie API — no separate extension needed.

Key Features

  • Menu Command: Use the Violentmonkey/Tampermonkey menu to export cookies for the current site or all sites.
  • Multiple Formats: Choose between Netscape (curl, wget, yt-dlp), JSON, or header format — cycle via the menu command.
  • Full Auth Cookies: Includes HttpOnly cookies (SAPISID, SID, SIDCC, etc.) — just enable one setting in your userscript manager.
  • API Auto-Detection: Works with GM_cookie callback, object, and promise APIs across browsers.
  • Fallback Chain: Tries URL → domain → all-cookies fallback if a scoped query fails.
  • Visual Feedback: Toast notification on success with cookie count.
  • Setup Banner: If the API is unavailable, a guided overlay shows exactly which settings to enable.

Usage

Action Result
VM/TM menu → Export Cookies Export cookies for current site
VM/TM menu → Export All Cookies Export cookies for all sites
VM/TM menu → Format: name (click to change) Cycle through Netscape, JSON, header

Enable HttpOnly Access (One-Time)

The export includes auth cookies by default. To include HttpOnly cookies:

Violentmonkey (Beta v2.35.1+):

  • Settings → Advanced → Script settings → Enable "Allow GM_cookie to access HTTP-only cookies"
  • Also enable it in this script's Settings tab

Tampermonkey:

  • Settings → Config mode: Advanced → Security → "Allow scripts to access cookies" → All

Running the Exported File

curl -b www.youtube.com_cookies.txt "https://example.com"
wget --load-cookies=www.youtube.com_cookies.txt "https://example.com"
yt-dlp --cookies www.youtube.com_cookies.txt "https://youtube.com/watch?v=..."
aria2c --load-cookies=www.youtube.com_cookies.txt "https://example.com"
http -b @www.youtube.com_cookies.txt "https://example.com"

How It Works

  1. Detects which GM_cookie API variant the userscript manager exposes (callback, object, promise).
  2. Queries cookies for the current site via the browser's extension API.
  3. Retries with domain then empty details if the URL-scoped query fails.
  4. Converts to the selected format (Netscape, JSON, or header).
  5. Triggers a file download as example.com_cookies.txt.
  6. Format selection persists across sessions.

Compatibility

Manager Status
Tampermonkey ✅ Full support
Violentmonkey ✅ v2.35.1+ (enable HttpOnly per above)
Greasemonkey ❌ GM_cookie not supported

The exported file works with any tool that accepts Netscape cookie files — notably curl, wget, yt-dlp, aria2, and HTTPie. This is the same format used by the original Netscape browser and adopted by curl; it remains the standard for passing browser cookies to command-line HTTP tools.

Installation

  1. Install Violentmonkey or Tampermonkey
  2. Install this script
  3. Visit any site and use the VM/TM menu → Export Cookies

No configuration required. For full auth cookie export including HttpOnly cookies, enable cookie access in your manager's settings (see above).