]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[extractor/generic] Fix following incomplete redirects (#5640)
authorSergey M․ <dstftw@gmail.com>
Thu, 7 May 2015 15:02:59 +0000 (21:02 +0600)
committerSergey M․ <dstftw@gmail.com>
Thu, 7 May 2015 15:02:59 +0000 (21:02 +0600)
youtube_dl/extractor/generic.py

index d09e856652e2536fd475ad5fb75bae0854ab725e..cd7c47d6d1801ef2468d789215f0f5f0b438565e 100644 (file)
@@ -1453,7 +1453,7 @@ class GenericIE(InfoExtractor):
                 if refresh_header:
                     found = re.search(REDIRECT_REGEX, refresh_header)
             if found:
-                new_url = found.group(1)
+                new_url = compat_urlparse.urljoin(url, found.group(1))
                 self.report_following_redirect(new_url)
                 return {
                     '_type': 'url',