Download all content from a Telegram channel.
When you know a channel which continously shares content of interest, you may want to store them on your computer. It is also useful as the channel, or the app itself, may shut down at some point.
The program is targeted for channels which provide media such as documents, audio files, videos or pictures. In this design, it is rather not suitable for plain text messages.
To use this program, it is beforehand required to have an API ID and an API hash which you can get from https://core.telegram.org/api/obtaining_api_id#obtaining-api-id. After that:
- Set the folder where you want the files to be downloaded.
- Paste your API ID and API hash in the designated fields.
- Type in the channel name under the variable
channel
. Pasting the full link such as https://t.me/channelname works too. - Set the value for
limit
which indicates how many files you want to download. It downloads in order from the most recent one. SetNone
if you want to get all. - After starting the program, you may be prompted to enter your telephone number. Enter it with international format such as +49123456789 . Telegram sends you then a code which you then must enter too.
The program downloads all but checks if media is already present in the folder (it may have been downloaded before). If it is present, it is skipped.
Required external libraries are
- Telethon: https://github.com/LonamiWebs/Telethon
pip install telethon
Author: Jonas Dossmann
Distributed under the AGPL-3.0 license.