Redgifs fix
Handle redgifs link with trailing / causing id to return empty string.
This commit is contained in:
@@ -24,6 +24,8 @@ class Redgifs(BaseDownloader):
|
||||
@staticmethod
|
||||
def _get_link(url: str) -> set[str]:
|
||||
try:
|
||||
if url.endswith("/"):
|
||||
url = url.removesuffix("/")
|
||||
redgif_id = re.match(r".*/(.*?)(\..{0,})?$", url).group(1)
|
||||
except AttributeError:
|
||||
raise SiteDownloaderError(f"Could not extract Redgifs ID from {url}")
|
||||
|
||||
Reference in New Issue
Block a user