From e5fcb50e70247181b41d45ac2b17dfd2c23ff131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 31 Jan 2018 12:34:39 +0100 Subject: [PATCH] fix double extensions? --- robot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robot.py b/robot.py index 725713c..1f7dc7b 100755 --- a/robot.py +++ b/robot.py @@ -43,7 +43,7 @@ def download_ydl(urls): def download_raw(url): ext = '' - if 'api.telegram.org' in url and 'animation' in url: + if 'api.telegram.org' in url and 'animation' in url and "mp4" not in url: ext = '.mp4' local_filename = OUT_DIR + '/' + date() + '__' + url.split('/')[-1] + ext r = requests.get(url, stream=True)