alfem / telegram-downloader-bot

A Telegram bot for file downloading automation
Other
124 stars 49 forks source link

Option to download audio/music #11

Closed samthelion17 closed 4 years ago

samthelion17 commented 4 years ago

Sorry to put this issues one by one instead of combining them all... Will it be too much trouble to make the bot download audio files too?

Cheers!

alfem commented 4 years ago

I think an audio file is a downloaded like any other file. Or do you mean voice messages?

samthelion17 commented 4 years ago

I think an audio file is a downloaded like any other file. Or do you mean voice messages?

Yeah, it could be voice messages, i don't know what's the difference, but they're not downloading.

alfem commented 4 years ago

Have you tested the new version I updated today?

samthelion17 commented 4 years ago

Have you tested the new version I updated today?

It is working great, thanks ;)

samthelion17 commented 4 years ago

Well, downloading voice messages works fine, but: when i forward this kinds of files to the bot it does nothing and displays this code in the console window: user@linux:~/.telegrambots$ python telegram-download-bot.py {'message': {'delete_chat_photo': False, 'new_chat_photo': [], 'from': {'username': u'samthelion', 'first_name': u'Samuel', 'last_name': u'Wilson', 'is_bot': False, 'language_code': u'es', 'id': CHATID}, 'photo': [], 'channel_chat_created': False, 'caption_entities': [], 'entities': [], 'new_chat_members': [], 'supergroup_chat_created': False, 'chat': {'username': u'samthelion', 'first_name': u'Samuel', 'last_name': u'Wilson', 'type': u'private', 'id': CHATID}, 'date': 1583431530, 'group_chat_created': False, 'audio': {'performer': u'Woe, Is Me', 'thumb': {'width': 90, 'file_size': 3825, 'file_id': 'AAMCBAADGQEAA41eYT9qTtQ_2LCBLjTGR-MJCHtlPgACjgcAAll1AAFTnTkpCMvhEd7cQeMhXQADAQAHcwADInwAAhgE', 'height': 90}, 'title': u"Hot 'N Cold", 'file_id': 'CQACAgQAAxkBAAONXmE_ak7UP9iwgS40xkfjCQh7ZT4AAo4HAAJZdQABU505KQjL4RHeGAQ', 'file_size': 7849801, 'duration': 187, 'mime_type': u'audio/mpeg'}, 'message_id': 141}, 'update_id': 816774170}

And the same thing happens with rounded videos... tgscreen

alfem commented 4 years ago

I made a quick test with a mp3 file and released a new version. Please test it.

Open a new issue for those 'round videos' (Right now I do not know what are them) to avoid longs issues with unrelated fixes.

samthelion17 commented 4 years ago

It is working now, thanks.