Add support for direct links with parameters

This commit is contained in:
Serene-Arc
2021-04-05 15:03:09 +10:00
committed by Ali Parlakci
parent 4b49991cd6
commit c2c3d03205
2 changed files with 3 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ class DownloadFactory:
url_beginning = r'\s*(https?://(www\.)?)'
if re.match(url_beginning + r'i\.imgur.*\.gifv$', url):
return Imgur
elif re.match(url_beginning + r'.*/.*\.\w{3,4}$', url):
elif re.match(url_beginning + r'.*/.*\.\w{3,4}(\?[\w;&=]*)?$', url):
return Direct
elif re.match(url_beginning + r'erome\.com.*', url):
return Erome