]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[youtube] Fix relative URLs in description
authorSergey M․ <dstftw@gmail.com>
Sat, 14 Oct 2017 13:26:24 +0000 (20:26 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 14 Oct 2017 13:26:52 +0000 (20:26 +0700)
youtube_dl/extractor/youtube.py

index 6e2d57d6a1f1b5215ce8c3c758579b352e083a0f..4e8db240d3f9d141cfa457c1d941d1b5399f0c67 100644 (file)
@@ -1630,7 +1630,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
                     class="[^"]*"[^>]*>
                 [^<]+\.{3}\s*
                 </a>
-            ''', r'\1', video_description)
+            ''', lambda m: compat_urlparse.urljoin(url, m.group(1)), video_description)
             video_description = clean_html(video_description)
         else:
             fd_mobj = re.search(r'<meta name="description" content="([^"]+)"', video_webpage)