mirror of
https://github.com/LonamiWebs/Telethon
synced 2025-09-01 06:45:50 +00:00
Added ability to download media
Now you can also download any message media, exactly the same way you can upload any media
This commit is contained in:
3
main.py
3
main.py
@@ -78,8 +78,7 @@ if __name__ == '__main__':
|
||||
# and print them in "[hh:mm] Sender: Message" text format
|
||||
for msg, sender in zip(reversed(messages), reversed(senders)):
|
||||
name = sender.first_name if sender else '???'
|
||||
date = datetime.fromtimestamp(msg.date)
|
||||
print('[{}:{}] {}: {}'.format(date.hour, date.minute, name, msg.message))
|
||||
print('[{}:{}] {}: {}'.format(msg.date.hour, msg.date.minute, name, msg.message))
|
||||
|
||||
# Send photo
|
||||
elif msg.startswith('!p '):
|
||||
|
Reference in New Issue
Block a user