diff --git a/robot.py b/robot.py index 5e33ac1..2c71994 100755 --- a/robot.py +++ b/robot.py @@ -50,9 +50,12 @@ def download_ydl(urls, date): def download_raw(url, date): - ext = '' - if 'api.telegram.org' in url and 'animation' in url and "mp4" not in url: + if 'api.telegram.org' in url \ + and ('animation' in url or 'video' in url) \ + and "mp4" not in url: ext = '.mp4' + else: + ext = '' local_filename = OUT_DIR + '/' + datestr(date) + '__' + url.split('/')[-1] + ext r = requests.get(url, stream=True) with open(local_filename, 'wb') as f: