Skip to content

"A Python tool for downloading videos, images, PDFs, ZIPs, and more from Telegram channels and groups, featuring resumable downloads, batch processing, and progress tracking."

License

Notifications You must be signed in to change notification settings

mdic/telegram-batch-media-downloader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Batch Media Downloader

Telegram Batch Media Downloader is a fork of Telegram Bulk Media Downloader, a Python-based tool that allows users to download various types of media files (videos, images, PDFs, ZIPs, etc.) from Telegram channels and groups. The downloader supports resumable downloads, batch processing, and progress tracking, making it ideal for managing large volumes of media efficiently.

Features

  • Batch Processing: Downloads media in configurable batches for better resource management.
  • 🆕 Use Chat_ID instead of chat/group name: Automatically converts the Chat_ID number to the chat/group name.
  • Multi-Media Support: Supports videos, images, PDFs, ZIP files, and more.
  • 🆕 File Autorenaming: When a file e.g. a video is embedded (i.e. directly playable) from a chat, it uses the accompanying text as filename of the saved file.
  • Progress Tracking: Displays detailed progress bars for each download.
  • Configurable Settings: Easily customizable batch size and session settings via .env file.
  • Cross-Platform: Runs on Windows, macOS, and Linux.
  • Lightweight: Requires only Python and a few libraries to run.

Screenshots

Here are some screenshots demonstrating the tool in action: Download Progress Download Progress

Requirements

  • Python 3.8+
  • Telegram API credentials (API ID and API Hash)

Installation

  1. Clone the repository:

    git clone https://github.com/mdic/telegram-batch-media-downloader
    cd telegram-batch-media-downloader
  2. Install dependencies:

    pip install -r requirements.txt
  3. Create a .env file and configure it:

    API_ID=your_api_id
    API_HASH=your_api_hash
    SESSION_NAME=default_session
    BATCH_SIZE=5
  4. Run the script:

    python src/tbmd.py

Usage

  1. Start the script:

    python src/tbmd.py
  2. Enter the Telegram channel username or group link when prompted.

  3. Select the type of media to download (e.g., videos, images, PDFs).

  4. Watch as your files are downloaded with detailed progress bars!

Advanced Configuration

Resuming Downloads

The downloader automatically saves the progress of completed files in a download_state.json file. To resume downloads, simply restart the script, and it will skip already downloaded files.

Batch Size

To adjust the number of files downloaded in parallel, update the BATCH_SIZE value in the .env file.

Supported Media Types

The tool supports the following media types:

  • Videos
  • Images
  • PDFs
  • ZIP files
  • Any other Telegram media

License

This project is licensed under GPLv3 License. See the LICENSE file for details.

Acknowledgments

  • Vinod Kumar for the original code 🙏.
  • Telethon - For making Telegram API integration easy.
  • TQDM - For elegant progress bars.
  • Colorama - For colorful console output.

Made with ❤️ by Vinod Kumar and edited with equal ❤️ by Matteo Di Cristofaro .

About

"A Python tool for downloading videos, images, PDFs, ZIPs, and more from Telegram channels and groups, featuring resumable downloads, batch processing, and progress tracking."

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%