summary refs log tree commit diff
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2019-11-09 09:22:24 +0100
committerRemita Amine <remitamine@gmail.com>2019-11-09 09:22:24 +0100
commit0b16b3c2d35d1706ec5c55e5b06352c753127368 (patch)
treee9944617c45264adaa31da877bbf4ac38063be6f
parentd4f53af482cc47b0473a3576da7ad902bea4ac39 (diff)
downloadyoutube-dl-0b16b3c2d35d1706ec5c55e5b06352c753127368.tar.gz
youtube-dl-0b16b3c2d35d1706ec5c55e5b06352c753127368.tar.xz
youtube-dl-0b16b3c2d35d1706ec5c55e5b06352c753127368.zip
[twitch] add support for Clip embed URLs
-rw-r--r--youtube_dl/extractor/twitch.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.py
index ca7676fe2..a5681409c 100644
--- a/youtube_dl/extractor/twitch.py
+++ b/youtube_dl/extractor/twitch.py
@@ -644,7 +644,7 @@ class TwitchStreamIE(TwitchBaseIE):
 
 class TwitchClipsIE(TwitchBaseIE):
     IE_NAME = 'twitch:clips'
-    _VALID_URL = r'https?://(?:clips\.twitch\.tv/(?:[^/]+/)*|(?:www\.)?twitch\.tv/[^/]+/clip/)(?P<id>[^/?#&]+)'
+    _VALID_URL = r'https?://(?:clips\.twitch\.tv/(?:embed\?.*?\bclip=|(?:[^/]+/)*)|(?:www\.)?twitch\.tv/[^/]+/clip/)(?P<id>[^/?#&]+)'
 
     _TESTS = [{
         'url': 'https://clips.twitch.tv/FaintLightGullWholeWheat',
@@ -667,6 +667,9 @@ class TwitchClipsIE(TwitchBaseIE):
     }, {
         'url': 'https://www.twitch.tv/sergeynixon/clip/StormyThankfulSproutFutureMan',
         'only_matching': True,
+    }, {
+        'url': 'https://clips.twitch.tv/embed?clip=InquisitiveBreakableYogurtJebaited',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):