Merge pull request #748 from Soulsuck24/development
This commit is contained in:
@@ -28,7 +28,7 @@ class DownloadFactory:
|
||||
sanitised_url = DownloadFactory.sanitise_url(url)
|
||||
if re.match(r"(i\.|m\.)?imgur", sanitised_url):
|
||||
return Imgur
|
||||
elif re.match(r"(i\.|thumbs\d\.)?(redgifs|gifdeliverynetwork)", sanitised_url):
|
||||
elif re.match(r"(i\.|thumbs\d\.|v\d\.)?(redgifs|gifdeliverynetwork)", sanitised_url):
|
||||
return Redgifs
|
||||
elif re.match(r".*/.*\.[a-zA-Z34]{3,4}(\?[\w;&=]*)?$", sanitised_url) and not DownloadFactory.is_web_resource(
|
||||
sanitised_url
|
||||
|
||||
@@ -27,7 +27,7 @@ class Redgifs(BaseDownloader):
|
||||
try:
|
||||
if url.endswith("/"):
|
||||
url = url.removesuffix("/")
|
||||
redgif_id = re.match(r".*/(.*?)(?:\?.*|\..{0,})?$", url).group(1).lower()
|
||||
redgif_id = re.match(r".*/(.*?)(?:#.*|\?.*|\..{0,})?$", url).group(1).lower()
|
||||
if redgif_id.endswith("-mobile"):
|
||||
redgif_id = redgif_id.removesuffix("-mobile")
|
||||
except AttributeError:
|
||||
|
||||
Reference in New Issue
Block a user