Redgifs fixed?

If this doesn't work then I give up...
This commit is contained in:
SoulSuck24
2022-09-16 20:41:17 -04:00
parent 0a9ecac410
commit 95749584ec
2 changed files with 6 additions and 3 deletions

View File

@@ -27,6 +27,8 @@ class DownloadFactory:
sanitised_url = DownloadFactory.sanitise_url(url)
if re.match(r'(i\.)?imgur.*\.gif.+$', sanitised_url):
return Imgur
elif re.match(r'(i\.)?(redgifs|gifdeliverynetwork)', sanitised_url):
return Redgifs
elif re.match(r'.*/.*\.\w{3,4}(\?[\w;&=]*)?$', sanitised_url) and \
not DownloadFactory.is_web_resource(sanitised_url):
return Direct
@@ -40,8 +42,6 @@ class DownloadFactory:
return Gfycat
elif re.match(r'(m\.)?imgur.*', sanitised_url):
return Imgur
elif re.match(r'(redgifs|gifdeliverynetwork)', sanitised_url):
return Redgifs
elif re.match(r'reddit\.com/r/', sanitised_url):
return SelfPost
elif re.match(r'(m\.)?youtu\.?be', sanitised_url):