-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[extractor/nebula] Remove broken cookie support #5979
[extractor/nebula] Remove broken cookie support #5979
Conversation
Nebula has moved their authentication token from the cookies into local storage. Therefore, authenticating via `--cookies-from-browser` is no longer feasible. Accessing the browsers' local storage cache is currently not supported by yt-dlp.
yt_dlp/extractor/nebula.py
Outdated
'url': zype_video_url, | ||
'formats': fmts, | ||
'subtitles': subs, | ||
'url_result': f'https://nebula.app/{episode["slug"]}' if not fetch_formats_and_subs else '', |
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.
'url_result': f'https://nebula.app/{episode["slug"]}' if not fetch_formats_and_subs else '', | |
'url_result': f'https://nebula.app/{episode["slug"]}' if not fetch_formats_and_subs else '', |
did u mean webpage_url
?
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.
I guess I do.
I've always been using url_result
here, I just looked up webpage_url
for the first time. I guess url_result
is a remnant of when this extractor was still handing off videos to the Zype extractor for downloading.
Changing it now.
All unit tests now pass again. This should also fix the broken channel downloading support. (Admittedly, that fix probably should have gone to the earlier PR, if you want to be really precise. It's here purely out of laziness. Sorry for the confusion.) |
No, it's fine. I was planning to merge them together anyway |
@pukkandan With no intention to put additional pressure on you — is there anything I can do to support you in advancing this? Anything I could check, improve or deliver (e.g. test results) to make life easier for you? I could combine the two Nebula PRs, or close both and instead reopen a cleaner, joined one? |
This PR contains the other one already, no? I've just been too busy irl this month and a lot of PRs are pending since last release. I expect to have more time in a couple of days |
It kinda does, yeah. It's two different branches (on top of each other), and there's two PRs with somewhat outdated titles and descriptions, so... it was just the only thing I could think of to make things easier for you.
Ok, no worries. Thanks for your all your hard, highly appreciated work! |
You've re-introduced the Have a look at master...pukkandan:yt-dlp-dev:features/nebula-flat. Note that I don't have an account and so haven't tested any of the changes. Expect some bugs |
👍 I'll look into and will test your branch right now! |
@pukkandan I took a look and ran some tests, but on the spot, I'm struggling to understand the reasoning behind your changes. As you know, we don't really see eye to eye on code style. 😉 As all the explaining code comments have been removed, and your commit messages are also not really telling much of a story, I don't have much to go by. Therefore, here are some notes from my tests, but I often don't yet know why this has changed or why it doesn't work anymore and behaves the way it does not.
|
Authored by: hheimbuerger Closes yt-dlp#4002
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
NOTE: This is based on the unmerged branch fix-nebula-extractor (apologies for the unspecific name) from PR #4002. It should either be merged after or into that branch.
Removes broken cookie authentication code from the Nebula extractor.
Reason: Nebula has moved their authentication token from the cookies into local storage. Therefore, authenticating via
--cookies-from-browser
is no longer feasible. Accessing the browsers' local storage cache is currently not supported by yt-dlp. (Discord conversation)The extractor now uses
raise_login_required(method='password')
to notify users trying to authenticate from cookies.Note that this removes some additional (arguably accidental) functionality, where you would allow yt-dlp once to authorize to Nebula using a supported authentication method, and then yt-dlp would store the authentication token as a cookie and you could reuse that during subsequent runs without providing a supported authentication method. But I find that too magic, and difficult to explain and reason about, so I didn't mind it going away.
The extractor-internal test cases are currently broken. I'm pretty sure it's not due to any extractor issues, but rather new requirements since introduced by the test suite. I will look into that next week, but didn't want to hold back on opening the PR in the meantime.EDIT 2023-01-09: All unit tests now pass, and manual tests (including channel downloading) have been successful, too.
Fixes the bug report in this Discord conversation.
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 one of the following options:
What is the purpose of your pull request?