A Python program to download files from Telegram channels, it can save files locally or send them to a Discord webhook.
- Download files from any Telegram channel you have access to
- Filter downloads by file extension (e.g., .txt, .pdf, .mp3)
- Set time parameters (download files from specified days/hours)
- Save to folder or send to a Discord webhook
- Renaming to avoid dupes
- Python 3.9+
- Telegram account
- Telegram API credentials (API ID and API Hash)
- Optional: Discord webhook
- Get your Telegram API credentials from my.telegram.org/apps
- Update the
API_IDandAPI_HASHin the file with your credentials
-
Run the script:
python telegramdl.py- If you don't have the dependancies installed, it will automatically install them for you
-
Follow the prompts:
- Enter Telegram channel link or ID
- Specify time frame (e.g., '7d' for 7 days, '24h' for 24 hours, 'all' for all messages)
- Enter file extension to download (e.g., .txt, .pdf)
- Choose download method (save to folder or send to webhook)
The tool accepts various channel formats:
- Channel ID (numeric)
- Username (e.g., 'channelname')
- t.me links (e.g., 't.me/channelname')
- web.telegram.org links (a bit broken i think)
- When trying to download from private channels, you need to be a member of the channel
- On first run, you'll need to log in to your Telegram account