[youtube] Support expanding alternative format of links in description (Closes #8164)
authorSergey M․ <dstftw@gmail.com>
Thu, 7 Jan 2016 18:52:55 +0000 (00:52 +0600)
committerSergey M․ <dstftw@gmail.com>
Thu, 7 Jan 2016 18:52:55 +0000 (00:52 +0600)
youtube_dl/extractor/youtube.py

index 4aac2cc03a0b10886c997d18e0607a54a0d0447f..897641e4283d0c3423adfb47c067f7be03b79cf7 100644 (file)
@@ -1235,10 +1235,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
             video_description = re.sub(r'''(?x)
                 <a\s+
                     (?:[a-zA-Z-]+="[^"]+"\s+)*?
-                    title="([^"]+)"\s+
+                    (?:title|href)="([^"]+)"\s+
                     (?:[a-zA-Z-]+="[^"]+"\s+)*?
-                    class="yt-uix-redirect-link"\s*>
-                [^<]+
+                    class="(?:yt-uix-redirect-link|yt-uix-sessionlink[^"]*)".*?>
+                [^<]+\.{3}\s*
                 </a>
             ''', r'\1', video_description)
             video_description = clean_html(video_description)