[generic] Unescape HTML escape sequences in redirect urls (fixes #6311)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 22 Jul 2015 21:33:49 +0000 (23:33 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Wed, 22 Jul 2015 21:33:49 +0000 (23:33 +0200)
youtube_dl/extractor/generic.py

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