ETCExtensions / Edit-This-Cookie

EditThisCookie is the famous Google Chrome/Chromium extension for editing cookies
http://www.editthiscookie.com
Other
1.78k stars 472 forks source link

Produces invalid cookies.txt entries on opera. #316

Open ballsystemlord opened 3 years ago

ballsystemlord commented 3 years ago

When saving cookies in Netscape format on opera it produces a cookies file with spaces instead of tabs. It also gives timestamps an XXX.XXX value whereas it should have an XXX value. Example: .youtube.com FALSE / TRUE 1634163357.608693 GPS 1

Please fix this, Thanks!

ballsystemlord commented 3 years ago

I'm using opera: 79.0.4143.22. I'm running it on Devuan (Debian) Linux. Steps to reproduce: 1: Set export as netscape cookie file in the addon preferences. 2: Go to a website that sets cookies and open the addon. 3: Export to clipboard all the cookies of that domain and paste them.

It's youtube-dl that requires the cookies or else youtube.com bans the client PC from doing downloads after a few hours (BTW: My net's normal speed is 300KBps, there's no way I could stress youtube's servers).

ballsystemlord commented 3 years ago

Addendum: This bug doesn't affect chromium.

ballsystemlord commented 3 years ago

Ok, final post.

This is the spec under which python claims to operate: https://curl.se/docs/http-cookies.html

I've found all the problems in the format that is spat out by "edit this cookie": 1: You need the correct header. "# Netscape HTTP Cookie File" 2: It's unclear why, maybe even a bug in python, but the value needs to be "TRUE" for "include subdomains". 3: The timestamps don't have to be present, but they MUST be integers only. 4: You need to use tabs, not spaces. 5: Domains need to have a beginning ".". IDK why. I really think this is a bug in python given that the actual curl doc mentioned uses "example.com" not ".example.com".

Considering this shouldn't be too hard to fix I hate bailing, but IDK JS. Thanks for your help.