Imgur webp coverage

update regex to catch _d in webp links from imgur.
This commit is contained in:
Soulsuck24
2022-12-11 14:20:04 -05:00
parent 1bc20f238e
commit 15a9d25a9d
2 changed files with 5 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ class Imgur(BaseDownloader):
@staticmethod
def _get_data(link: str) -> dict:
try:
imgur_id = re.match(r".*/(.*?)(\..{0,})?$", link).group(1)
imgur_id = re.match(r".*/(.*?)(_d)?(\..{0,})?$", link).group(1)
gallery = "a/" if re.search(r".*/(.*?)(gallery/|a/)", link) else ""
link = f"https://imgur.com/{gallery}{imgur_id}"
except AttributeError: