Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dandv/convert-chrome-cookies-to-netscape-format
Convert the cookies from Chrome's Application -> Storage -> Cookies, into the Netscape format accepted by youtube-dl
https://github.com/dandv/convert-chrome-cookies-to-netscape-format
chrome cookies youtube youtube-dl youtube-downloader
Last synced: about 2 months ago
JSON representation
Convert the cookies from Chrome's Application -> Storage -> Cookies, into the Netscape format accepted by youtube-dl
- Host: GitHub
- URL: https://github.com/dandv/convert-chrome-cookies-to-netscape-format
- Owner: dandv
- License: mit
- Created: 2020-03-28T12:35:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-19T13:58:45.000Z (about 3 years ago)
- Last Synced: 2024-10-15T03:45:50.724Z (2 months ago)
- Topics: chrome, cookies, youtube, youtube-dl, youtube-downloader
- Language: JavaScript
- Size: 147 KB
- Stars: 145
- Watchers: 4
- Forks: 25
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Convert Chrome cookies to Netscape format
This is a very simple Node.js script to convert the cookies you can copy/paste from Chrome's Application -> Storage -> Cookies, into the [Netscape cookies format](https://curl.haxx.se/docs/http-cookies.html) accepted by tools like `curl` and `youtube-dl`.
It's useful because you don't have to install any browser extension in order to save or convert the cookies. [Browser extensions are a known security risk.](https://www.howtogeek.com/188346/why-browser-extensions-can-be-dangerous-and-how-to-protect-yourself/)
## Requirements
* A terminal/command line window
* [Node.js](https://nodejs.org/en/download/)## Usage
1. Download [the script](https://raw.githubusercontent.com/dandv/convert-chrome-cookies-to-netscape-format/master/convert-cookies.js) (or clone this repo if you prefer)
2. In an editor, open a new blank file
2. In Chrome/Chromium, launch Developer Tools (F12)
3. Navigate to the site you need cookies from, e.g. YouTube, and log in.
4. Go to Application -> Storage -> Cookies
5. For each URL under Cookies (e.g. `https://www.youtube.com`), copy the table of cookies into the clipboard, then paste it at the end of the file you've opened in step 2. ![Chrome cookies](chrome-cookies.png)
6. Save the file with a name like `file-with-cookies-copy-pasted-from-Chrome.txt`
7. Run the script:node convert-cookies.js file-with-cookies-copy-pasted-from-Chrome.txt > netscape-cookies.txt
Now, `netscape-cookies.txt` will contain cookies ready to be used by any application that reads cookies in Netscape format (e.g. `yotube-dl` or `curl`).
## Author
Copyright © 2020 [Dan Dascalescu](https://dandascalescu.com).