fix double extensions?

This commit is contained in:
Tomáš Mládek 2018-01-31 12:34:39 +01:00 committed by Tomáš Mládek
parent 97a0f13d17
commit e5fcb50e70

View file

@ -43,7 +43,7 @@ def download_ydl(urls):
def download_raw(url): def download_raw(url):
ext = '' 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' ext = '.mp4'
local_filename = OUT_DIR + '/' + date() + '__' + url.split('/')[-1] + ext local_filename = OUT_DIR + '/' + date() + '__' + url.split('/')[-1] + ext
r = requests.get(url, stream=True) r = requests.get(url, stream=True)