[universal] tweak

This commit is contained in:
Mort Yao 2021-10-20 18:15:51 +02:00
parent b32741ad8e
commit 798ad6d14e
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -76,7 +76,7 @@ def universal_download(url, output_dir='.', merge=True, info_only=False, **kwarg
urls = [] urls = []
for i in media_exts: for i in media_exts:
urls += re.findall(r'(https?://[^ ;&"\'\\<>]*' + i + r'[^ ;&"\'\\<>]*)', page) urls += re.findall(r'(https?://[^ ;&"\'\\<>]*' + i + r'[^ =?;&"\'\\<>]*)', page)
p_urls = re.findall(r'(https?%3A%2F%2F[^;&"]+' + i + r'[^;&"]*)', page) p_urls = re.findall(r'(https?%3A%2F%2F[^;&"]+' + i + r'[^;&"]*)', page)
urls += [parse.unquote(url) for url in p_urls] urls += [parse.unquote(url) for url in p_urls]