Don't have Telegram yet? Try it now!
https://islascruz.org/blog/2017/01/27/attachments-python-imap/
Get attachments with Python over IMAP