]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[youtube:truncated_url] Also match mail subscription links (#2214)
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 23 Jan 2014 15:14:54 +0000 (16:14 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 23 Jan 2014 15:14:54 +0000 (16:14 +0100)
youtube_dl/extractor/youtube.py

index 17576330934470435f1ca1aa6135959f91da13f5..6deb56447e5d01c64f68bd947c98dba8df82e7c2 100644 (file)
@@ -1805,7 +1805,10 @@ class YoutubeFavouritesIE(YoutubeBaseInfoExtractor):
 class YoutubeTruncatedURLIE(InfoExtractor):
     IE_NAME = 'youtube:truncated_url'
     IE_DESC = False  # Do not list
-    _VALID_URL = r'(?:https?://)?[^/]+/watch\?feature=[a-z_]+$'
+    _VALID_URL = r'''(?x)
+        (?:https?://)?[^/]+/watch\?feature=[a-z_]+$|
+        (?:https?://)?(?:www\.)?youtube\.com/attribution_link\?a=[^&]+$
+    '''
 
     def _real_extract(self, url):
         raise ExtractorError(