mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 06:10:12 +01:00
[twitch:clips] Extend _VALID_URL (closes #17559)
This commit is contained in:
parent
f5b0175349
commit
db348e8849
|
@ -559,7 +559,8 @@ def suitable(cls, url):
|
|||
TwitchAllVideosIE,
|
||||
TwitchUploadsIE,
|
||||
TwitchPastBroadcastsIE,
|
||||
TwitchHighlightsIE))
|
||||
TwitchHighlightsIE,
|
||||
TwitchClipsIE))
|
||||
else super(TwitchStreamIE, cls).suitable(url))
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
@ -633,7 +634,7 @@ def _real_extract(self, url):
|
|||
|
||||
class TwitchClipsIE(TwitchBaseIE):
|
||||
IE_NAME = 'twitch:clips'
|
||||
_VALID_URL = r'https?://clips\.twitch\.tv/(?:[^/]+/)*(?P<id>[^/?#&]+)'
|
||||
_VALID_URL = r'https?://(?:clips\.twitch\.tv/(?:[^/]+/)*|(?:www\.)?twitch\.tv/[^/]+/clip/)(?P<id>[^/?#&]+)'
|
||||
|
||||
_TESTS = [{
|
||||
'url': 'https://clips.twitch.tv/FaintLightGullWholeWheat',
|
||||
|
@ -653,6 +654,9 @@ class TwitchClipsIE(TwitchBaseIE):
|
|||
# multiple formats
|
||||
'url': 'https://clips.twitch.tv/rflegendary/UninterestedBeeDAESuppy',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://www.twitch.tv/sergeynixon/clip/StormyThankfulSproutFutureMan',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
|
Loading…
Reference in New Issue
Block a user