Redgif updates
Coverage for direct links. The direct link won't work because it will have the wrong auth anyway but this will at least end up with the right API call.
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -27,7 +27,9 @@ class Redgifs(BaseDownloader):
|
||||
try:
|
||||
if url.endswith("/"):
|
||||
url = url.removesuffix("/")
|
||||
redgif_id = re.match(r".*/(.*?)(?:\?.*|\..{0,})?$", url).group(1)
|
||||
redgif_id = re.match(r".*/(.*?)(?:\?.*|\..{0,})?$", url).group(1).lower()
|
||||
if redgif_id.endswith("-mobile"):
|
||||
redgif_id = redgif_id.removesuffix("-mobile")
|
||||
except AttributeError:
|
||||
raise SiteDownloaderError(f"Could not extract Redgifs ID from {url}")
|
||||
return redgif_id
|
||||
|
||||
Reference in new issue
Block a user