fix double extensions?

This commit is contained in:
Tomáš Mládek 2018-01-31 12:34:39 +01:00
parent 7545f69d16
commit 08e13072e8

View file

@ -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)