Browse Source

[generic] The url in the <meta redirect> doesn't need to be enclosed in single quotes (fixes #3770)

See the examples in https://en.wikipedia.org/wiki/Meta_refresh or the shortened urls from https://t.co/.
totalwebcasting
Jaime Marquínez Ferrándiz 10 years ago
parent
commit
a04aa7a9e6
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      youtube_dl/extractor/generic.py

+ 1
- 1
youtube_dl/extractor/generic.py View File

@ -877,7 +877,7 @@ class GenericIE(InfoExtractor):
if not found: if not found:
found = re.search( found = re.search(
r'(?i)<meta\s+(?=(?:[a-z-]+="[^"]+"\s+)*http-equiv="refresh")' 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) webpage)
if found: if found:
new_url = found.group(1) new_url = found.group(1)


Loading…
Cancel
Save