Search code examples
pythontelegram

Downloading files from telegram using api


There is a question, how to download new files or all files from a channel using python and telegram api?

And how to make the script using api detect new files?

I googled for information, but didn't find any information on this topic


Solution

  • You need some Telegram client module, e.g. Pyrogram.

    To be able to interact with the API you'll have to authorize first. After that handle update and check whether a message contains images and then download them.