[generic] The url in the <meta redirect> doesn't need to be enclosed in single quotes...
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 16 Sep 2014 20:53:48 +0000 (22:53 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 16 Sep 2014 20:53:48 +0000 (22:53 +0200)
See the examples in https://en.wikipedia.org/wiki/Meta_refresh or the shortened urls from https://t.co/.

youtube_dl/extractor/generic.py

index 2bfa20606cd7846b0d15e8c441de3fce2a8982f6..40eeaad16d42acf089d1d426a055d4e5ce5624cf 100644 (file)
@@ -877,7 +877,7 @@ class GenericIE(InfoExtractor):
         if not found:
             found = re.search(
                 r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")'
-                r'(?:[a-z-]+="[^"]+"\s+)*?content="[0-9]{,2};url=\'([^\']+)\'"',
+                r'(?:[a-z-]+="[^"]+"\s+)*?content="[0-9]{,2};url=\'?([^\'"]+)',
                 webpage)
             if found:
                 new_url = found.group(1)