-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[bandlabextractor] added new bandlab extractor for track, album, and playlist… #31206
base: master
Are you sure you want to change the base?
Conversation
c636d04
to
0201ee1
Compare
@dirkf the first run of the tests failed on one specific test because there was a utf8 string. I changed the test for the extractor to use a song which doesn't have utf8 chars in the name. All tests should pass if run again. |
You should be able to put back the Unicode test data now. |
@dirkf no worries. It doesn't really make the test any more robust. It just happened i chose a song with a unicode title. Should be clear to merge from my side :) |
is there a status on this? seems good to go |
Yep it can be merged any time. |
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.
Thanks for your work!
I've what may seem to be a lot of suggestions, but basically they come down to two things:
- in new extractors,
_TESTS
is preferred to_TEST
; - unifying the extraction code for the album and playlist extractors, which are almost identical.
In the second (7-part) change, you could also change the order of the two classes so that the derived IE is later.
@dt-rush any status on this? |
Hey @dirkf ! Thanks for the suggestions! I just updated the branch. Changes:
Cheers! |
nice nice! eager to see this merged |
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.
Let's check the CI tests after I fix (I hope) the Flake8 issues.
There are still some unresolved points from the previous review, plus the new ones here.
@dirkf fixed! |
bump |
youtube_dl/extractor/bandlab.py
Outdated
resource_id = self._match_id(url) | ||
kind_regex = re.compile(self._VALID_URL) | ||
kind = kind_regex.match(url).group('kind') |
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.
resource_id = self._match_id(url) | |
kind_regex = re.compile(self._VALID_URL) | |
kind = kind_regex.match(url).group('kind') | |
resource_id, kind = self._match_valid_url(url).group('id', 'kind') |
Download tests fail with 403 on API request. In the browser: |
@aiur-adept the tracks i provided in the original example (and the ones being used for the tests) have since been privated/removed so they should probably be changed to existing tracks/albums that'd probably be the reason for the 403 |
@itzTheMeow @dirkf it seems the helper methods from utils.py no longer exist. Were they moved somewhere else? |
(for example, traverse_obj) |
In this PR it might be necessary to pull the latest yt-dl source. In case anyone is trying to use the extractor with yt-dlp, they moved |
@dirkf thanks, i'm gonna rebase on upstream master and try to get this working |
#32881 has been pushed with fixed test data. This PR can close now in preference of that one. |
Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl 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?
Description of your pull request and other information
Added a bandlab extractor. Resolves #31184