Fix downloading .gifv instead of .mp4 (#228)

This commit is contained in:
Ali Parlakci
2021-03-27 23:00:47 +03:00
parent 58150570a3
commit 247fe3e6f7
2 changed files with 3 additions and 1 deletions

View File

@@ -38,6 +38,8 @@ class Imgur(BaseDownloader):
@staticmethod
def _get_data(link: str) -> dict:
if re.match(r".*i\.imgur\.com.*\.gifv$", link):
link = link.replace("i.imgur", "imgur")[:-5]
res = requests.get(link, cookies={'over18': '1', 'postpagebeta': '0'})
if res.status_code != 200: