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
Cookie fixes #6897
Cookie fixes #6897
Conversation
…e encrypted with an empty password
|
||
else: | ||
self._logger.warning(f'unknown cookie version: "{version}"', only_once=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to log unknown prefixes on the other platforms as well to debug issues like #6880 but because mac and windows sometimes store plaintext cookies the log would be spammed with random values. In the Linux case though there is no valid reason for there to be an unknown prefix so it is helpful to log the value (eg if chromium added a v12 encryption or something)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, you can add it.
This seems to work on Linux but I am still getting this line:
The extraction does succeed with the cookies it could decrypt (which seems like all?). |
how about now? I thought the fallback to empty case would be really rare but maybe not. Because none of the cookies eventually fail decryption my guess would be that the decryption with the password fails but then succeeds when attempting with the empty password |
Just updated and no longer getting that error, but I am still getting an error attempting to access a Patreon URI that worked before the Chrome change. Testing with this branch. I use the code with this branch in my project patreon-archiver and this line seems to work or I do not see how I would be making the API requests. But at the bottom when YouTubeDL is called I always get the error Same happens on command line when I run this branch's
|
I debugged some more and the
In the browser it definitely has a value: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I merge this, or are you looking into #6880, #6897 (comment)?
|
||
else: | ||
self._logger.warning(f'unknown cookie version: "{version}"', only_once=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, you can add it.
@mbway I think you need to rebase this. |
No |
For me this change fixes a lot but the session cookie is still coming as empty string. |
It seems that @Tatsh is still having an issue so maybe not. I have already looked over the code again to see why the session cookie might not be decrypting properly but I can't see any reason for it. Since you are a developer @Tatsh do you think you could provide a minimal example that is failing for you? so perhaps a cookie database containing junk data and let me know what desktop environment you are using |
I will look into the issue today. I too would like to see this merged ASAP. |
Had a deep look and tested on another machine. Cookie extraction is working well. The above issue I reported is no longer happening. Let's merge this? |
ee280c7
to
7aeda6c
Compare
Authored by: mbway
Description of your pull request and other information
Brings
--cookies-from-browser
up to date with recent changes to chromium.Prompted by #6880 I had a look at what had changed in chromium (note: link takes a long time to load) since the feature was initially added. It turned out none of the changes were relevant to that issue though. The notable changes relevant to yt-dlp are:
Template
Before submitting a pull request make sure you have:
In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:
What is the purpose of your pull request?