Imgur webp coverage
update regex to catch _d in webp links from imgur.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user