-
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
[Twitch] Add support for collections as per #20414 #20604
Conversation
Fixes #20414 |
I think you have to write that into the description to work |
@dstftw Can you please merge this one? |
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.
Please fix that issue
youtube_dl/extractor/twitch.py
Outdated
@@ -435,6 +435,62 @@ class TwitchVideosBaseIE(TwitchPlaylistBaseIE): | |||
_PLAYLIST_PATH = TwitchPlaylistBaseIE._PLAYLIST_PATH + '&broadcast_type=' | |||
|
|||
|
|||
class TwitchCollectionsIE(TwitchBaseIE): | |||
IE_NAME = 'twitch:collections' | |||
_VALID_URL = r'%s/collections/(?P<id>[\w\d]+)' % TwitchBaseIE._VALID_URL_BASE |
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.
Twitch collection IDs can have hyphens e.g. HgTD8zFrghUb-Q
, so it should be:
_VALID_URL = r'%s/collections/(?P<id>[\w\d\-]+)' % TwitchBaseIE._VALID_URL_BASE
Thanks |
I just looked through a bunch of collections and verified that this should work now |
Pls merge it |
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])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
Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.
Trying to download a Twitch collection (example) would result in an error: the url would fall to the TwitchStream regex and it would report that 'collections' is offline as if it were a streamer. I created
TwitchCollectionsIE
, a new extractor to retrieve the collection items as a playlist. Information on the Collections API can be found here.