From ab45dccb01082d49418d49f4ec08bf95dedad4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 2 Oct 2018 13:36:23 +0200 Subject: [PATCH] update deps, add support for video notes --- delojza.py | 7 ++++++- requirements.txt | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/delojza.py b/delojza.py index 7fe5caf..b8a597a 100755 --- a/delojza.py +++ b/delojza.py @@ -168,8 +168,11 @@ def handle_rest(bot, update): file = update.message.audio.file_id elif update.message.video is not None: file = update.message.video.file_id + elif update.message.video_note is not None: + file = update.message.video_note.file_id elif update.message.voice is not None: file = update.message.voice.file_id + if file is not None: url = bot.getFile(file).file_path handle([url], update.message, download_raw, filename=filename) @@ -201,7 +204,9 @@ def main(): dp.add_handler(MessageHandler(Filters.entity(MessageEntity.URL), handle_url)) dp.add_handler( - MessageHandler(Filters.photo | Filters.video | Filters.audio | Filters.voice | Filters.document, handle_rest)) + MessageHandler( + Filters.photo | Filters.video | Filters.video_note | Filters.audio | Filters.voice | Filters.document, + handle_rest)) dp.add_handler(MessageHandler(Filters.entity(MessageEntity.HASHTAG), handle_hashtag)) updater.start_polling() diff --git a/requirements.txt b/requirements.txt index 80e0ac4..9a7a900 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,12 +4,17 @@ # # pip-compile --output-file requirements.txt requirements.in # -certifi==2018.1.18 # via python-telegram-bot, requests +asn1crypto==0.24.0 # via cryptography +certifi==2018.8.24 # via python-telegram-bot, requests +cffi==1.11.5 # via cryptography chardet==3.0.4 # via requests -filetype==1.0.0 +cryptography==2.3.1 # via python-telegram-bot +filetype==1.0.1 future==0.16.0 # via python-telegram-bot -idna==2.6 # via requests -python-telegram-bot==9.0.0 -requests==2.18.4 -urllib3==1.22 # via requests -youtube-dl==2018.1.27 +idna==2.7 # via cryptography, requests +pycparser==2.19 # via cffi +python-telegram-bot==11.1.0 +requests==2.19.1 +six==1.11.0 # via cryptography +urllib3==1.23 # via requests +youtube-dl==2018.9.26