[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/.
This commit is contained in:
Jaime Marquínez Ferrándiz 2014-09-16 22:53:48 +02:00
parent 64892c0b79
commit a04aa7a9e6

View file

@ -877,7 +877,7 @@ def check_video(vurl):
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)