--cookie-jar

Netscape cookie file format

[13] Netscape Navigatorクッキーを保存するためにテキストファイルを使っていました。

[14] Lynx, wget, curl など各種 HTTPクライアントがこのファイル形式を採用しました。

他のクッキー表現形式についてはクッキー

[15] 現在の主要な Webブラウザーは独自形式でクッキーを保存するようになりました。

[16] かつては WebブラウザーGUI から Netscape 形式でクッキーストアエクスポートすることもできましたが、 近年は省かれています。 ただ需要はあるようで、 そのようなChrome拡張Firefox拡張が開発され利用されているようです。

[1] curl - How To Use, , https://curl.haxx.se/docs/manpage.html#-c

[10] CURLOPT_COOKIELIST, , https://curl.haxx.se/libcurl/c/CURLOPT_COOKIELIST.html

[11] curl - HTTP Cookies, , https://curl.haxx.se/docs/http-cookies.html

[2] curl の対応しているのは3種類: 名前と値の組を直接指定Netscape/Mozilla cookie file format ファイルで指定、 Set-Cookie: HTTPヘッダー形式ファイルで指定。

[12] curl/cookie.c at master · curl/curl · GitHub, https://github.com/curl/curl/blob/master/lib/cookie.c

[3] curl - How To Use, , https://curl.haxx.se/docs/manpage.html#-j

[4] GNU Wget 1.20 Manual, https://www.gnu.org/software/wget/manual/wget.html#index-cookies

[5] ytdl-org/youtube-dl: Command-line program to download videos from YouTube.com and other video sites () https://github.com/ytdl-org/youtube-dl#filesystem-options

--cookies FILE File to read cookies from and dump cookie

jar in

[6] ytdl-org/youtube-dl: Command-line program to download videos from YouTube.com and other video sites () https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl

Note that the cookies file must be in Mozilla/Netscape format and the first line of the cookies file must be either # HTTP Cookie File or # Netscape HTTP Cookie File. Make sure you have correct newline format in the cookies file and convert newlines if necessary to correspond with your OS, namely CRLF (\r\n) for Windows and LF (\n) for Unix and Unix-like systems (Linux, macOS, etc.). HTTP Error 400: Bad Request when using --cookies is a good sign of invalid newline format.

[7] http.cookiejar — Cookie handling for HTTP clients — Python 3.10.0a0 documentation, , https://docs.python.org/3.10/library/http.cookiejar.html#http.cookiejar.MozillaCookieJar

[8] HTTP::Cookies::Netscape - Access to Netscape cookies files - metacpan.org, https://metacpan.org/pod/HTTP::Cookies::Netscape

[9] lynx(1) - Linux man page () https://linux.die.net/man/1/lynx

[17] Cookieファイルについて () http://www.openspc2.org/JavaScript/study/cookie.html