1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-07 07:27:15 +08:00

extractor/TwitchClip: Added support for m. and go. links to clips

Also added (`only_matching`) tests for regex additions
This commit is contained in:
Felix Stupp 2020-04-06 02:07:36 +02:00
parent 3ba6c5eae0
commit b73f0f9f8d
No known key found for this signature in database
GPG Key ID: 93E1BD26F6B02FB7

View File

@ -647,7 +647,7 @@ class TwitchClipsIE(TwitchBaseIE):
https?:// https?://
(?: (?:
clips\.twitch\.tv/(?:embed\?.*?\bclip=|(?:[^/]+/)*)| clips\.twitch\.tv/(?:embed\?.*?\bclip=|(?:[^/]+/)*)|
(?:www\.)?twitch\.tv/[^/]+/clip/ (?:(?:www|go|m)\.)?twitch\.tv/[^/]+/clip/
) )
(?P<id>[^/?#&]+) (?P<id>[^/?#&]+)
''' '''
@ -676,6 +676,12 @@ class TwitchClipsIE(TwitchBaseIE):
}, { }, {
'url': 'https://clips.twitch.tv/embed?clip=InquisitiveBreakableYogurtJebaited', 'url': 'https://clips.twitch.tv/embed?clip=InquisitiveBreakableYogurtJebaited',
'only_matching': True, 'only_matching': True,
}, {
'url': 'https://m.twitch.tv/rossbroadcast/clip/ConfidentBraveHumanChefFrank',
'only_matching': True,
}, {
'url': 'https://go.twitch.tv/rossbroadcast/clip/ConfidentBraveHumanChefFrank',
'only_matching': True,
}] }]
def _real_extract(self, url): def _real_extract(self, url):