Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produces invalid cookies.txt entries on opera. #316

Open
ballsystemlord opened this issue Oct 13, 2021 · 3 comments
Open

Produces invalid cookies.txt entries on opera. #316

ballsystemlord opened this issue Oct 13, 2021 · 3 comments

Comments

@ballsystemlord
Copy link

ballsystemlord commented Oct 13, 2021

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
Copy link
Author

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
Copy link
Author

Addendum: This bug doesn't affect chromium.

@ballsystemlord
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant