Add //imgur.com/*.gifv

This commit is contained in:
Ali Parlakci 2021-04-06 16:38:52 +03:00
parent 9bceafc3e9
commit 7228bc572c
2 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class DownloadFactory:
@staticmethod
def pull_lever(url: str) -> Type[BaseDownloader]:
url_beginning = r'\s*(https?://(www\.)?)'
if re.match(url_beginning + r'i\.imgur.*\.gifv$', url):
if re.match(url_beginning + r'(i\.)?imgur.*\.gifv$', url):
return Imgur
elif re.match(url_beginning + r'.*/.*\.\w{3,4}(\?[\w;&=]*)?$', url):
return Direct

View File

@ -27,6 +27,7 @@ from bulkredditdownloader.site_downloaders.youtube import Youtube
('https://i.redd.it/affyv0axd5k61.png', Direct),
('https://imgur.com/3ls94yv.jpeg', Direct),
('https://i.imgur.com/BuzvZwb.gifv', Imgur),
('https://imgur.com/BuzvZwb.gifv', Imgur),
('https://i.imgur.com/6fNdLst.gif', Direct),
('https://imgur.com/a/MkxAzeg', Imgur),
('https://www.reddit.com/gallery/lu93m7', Gallery),