{"name":"telegram_media_downloader: Download Telegram Media with Ease","description":"telegram_media_downloader is a powerful, cross-platform tool designed to download media files from Telegram conversations, chats, and channels. It supports various media types and offers flexible download options, including a web UI and bot commands. Users can easily manage downloads, configure filters, and even upload files to cloud drives.","github":"https://github.com/tangyoha/telegram_media_downloader","url":"https://osrepos.com/repo/tangyoha-telegram_media_downloader","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/tangyoha-telegram_media_downloader","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/tangyoha-telegram_media_downloader.md","json":"https://osrepos.com/repo/tangyoha-telegram_media_downloader.json","topics":["telegram-bot","media-downloader","cross-platform","python","flask","telegram-tools","downloader"],"keywords":["telegram-bot","media-downloader","cross-platform","python","flask","telegram-tools","downloader"],"stars":null,"summary":"telegram_media_downloader is a powerful, cross-platform tool designed to download media files from Telegram conversations, chats, and channels. It supports various media types and offers flexible download options, including a web UI and bot commands. Users can easily manage downloads, configure filters, and even upload files to cloud drives.","content":"## Introduction\n\ntelegram_media_downloader is a robust, cross-platform tool designed for efficiently downloading media files from Telegram conversations, chats, and channels. Based on Dineshkarthik's original project, it offers comprehensive support for various media types, including audio, video, documents, and photos, with individual file sizes up to 2GiB. This versatile downloader provides multiple interaction methods, including a user-friendly web interface and bot commands, making it accessible for different use cases. It also uniquely supports downloading resources from private groups that you have already joined, even if they have download restrictions.\n\n## Installation\n\nGetting started with telegram_media_downloader is straightforward. Follow the instructions below based on your operating system or preferred deployment method.\n\n**For *nix OS distributions with `make` availability:**\n\nsh\ngit clone https://github.com/tangyoha/telegram_media_downloader.git\ncd telegram_media_downloader\nmake install\n\n\n**For Windows (without `make` inbuilt):**\n\nsh\ngit clone https://github.com/tangyoha/telegram_media_downloader.git\ncd telegram_media_downloader\npip3 install -r requirements.txt\n\n\n**Using Docker:**\n\nFor a more detailed installation tutorial, refer to the [official wiki](https://github.com/tangyoha/telegram_media_downloader/wiki \"How to use Docker\"). Ensure you have Docker and Docker Compose installed.\n\nsh\ndocker pull tangyoha/telegram_media_downloader:latest\nmkdir -p ~/app && mkdir -p ~/app/log/ && cd ~/app\nwget https://raw.githubusercontent.com/tangyoha/telegram_media_downloader/master/docker-compose.yaml -O docker-compose.yaml\nwget https://raw.githubusercontent.com/tangyoha/telegram_media_downloader/master/config.yaml -O config.yaml\nwget https://raw.githubusercontent.com/tangyoha/telegram_media_downloader/master/data.yaml -O data.yaml\n# Edit config.yaml and docker-compose.yaml as needed\nvi config.yaml\n\n# First time setup: run in foreground to enter phone number and code\ndocker-compose run --rm telegram_media_downloader\n\n# Subsequent startups can be in the background\ndocker-compose up -d\n\n\n**Upgrading:**\n\nsh\ncd telegram_media_downloader\npip3 install -r requirements.txt\n\n\n## Examples and Usage\n\ntelegram_media_downloader offers flexible ways to interact with it, whether through a web interface, bot commands, or direct execution.\n\n### Web Interface:\n\nOnce the application is running, you can access its web UI by opening a browser and navigating to `localhost:5000`. If running on a remote machine, ensure `web_host: 0.0.0.0` is configured. The web interface provides a visual way to monitor download progress and manage settings.\n\n### Bot Commands:\n\nFor bot-driven downloads, you need to configure `bot_token` in your `config.yaml`. Refer to the [documentation on how to download using robots](https://github.com/tangyoha/telegram_media_downloader/wiki/How-to-Download-Using-Robots \"How to Download Using Robots\") for detailed instructions. You can then issue `download` or `forward` commands via the bot.\n\n### Configuration (`config.yaml`):\n\nThe core of the downloader's behavior is controlled by the `config.yaml` file. Key parameters include:\n\n*   `api_hash` and `api_id`: Obtained from [my.telegram.org/apps](https://my.telegram.org/apps \"Telegram API Apps\").\n*   `chat`: A list of chat IDs to monitor, with options for `last_read_message_id` and `download_filter` (e.g., `message_date >= 2022-12-01 00:00:00`).\n*   `media_types`: Specify which media types to download (e.g., `audio`, `video`, `document`).\n*   `save_path`: The root directory for downloaded files.\n*   `upload_drive`: Configuration for uploading files to cloud drives like Rclone or Aligo, including options for zipping and deleting after upload.\n*   `proxy`: Support for `socks4`, `socks5`, and `http` proxies.\n\nHere's a snippet of a typical `config.yaml`:\n\nyaml\napi_hash: your_api_hash\napi_id: your_api_id\nchat:\n- chat_id: telegram_chat_id\n  last_read_message_id: 0\n  download_filter: message_date >= 2022-12-01 00:00:00 and message_date <= 2023-01-17 00:00:00\nmedia_types:\n- audio\n- document\n- photo\n- video\nsave_path: D:\\telegram_media_downloader\nupload_drive:\n  enable_upload_file: true\n  remote_dir: drive:/telegram\n  upload_adapter: rclone\n  rclone_path: D:\\rclone\\rclone.exe\nproxy:\n  scheme: socks5\n  hostname: 127.0.0.1\n  port: 1234\n\n\n### Execution:\n\nAfter configuring, simply run the script:\n\nsh\npython3 media_downloader.py\n\n\nDownloaded media will be organized within your `save_path` according to your `file_path_prefix` settings, which can include `chat_title`, `media_datetime`, and `media_type`.\n\n## Why Use telegram_media_downloader?\n\nThis tool stands out for several reasons:\n\n*   **Comprehensive Media Support:** Downloads a wide range of media types, including audio, video, documents, photos, and voice messages.\n*   **Flexible Download Control:** Utilize powerful filters based on message date to download specific content.\n*   **Multiple Interaction Methods:** Choose between a convenient web UI, automated bot commands, or direct script execution.\n*   **Cloud Integration:** Seamlessly upload downloaded files to various cloud storage providers via Rclone or Aligo, with options for zipping and post-upload deletion.\n*   **Cross-Platform Compatibility:** Works across different operating systems, including *nix and Windows, with Docker support for easy deployment.\n*   **Customizable File Organization:** Define how your downloaded files are structured and named using flexible prefix options.\n*   **Private Group Support:** Download content from private groups you've joined, even if standard download options are restricted.\n\n## Links\n\n*   **GitHub Repository:** [https://github.com/tangyoha/telegram_media_downloader](https://github.com/tangyoha/telegram_media_downloader \"GitHub Repository\")\n*   **Feature Request:** [https://github.com/tangyoha/telegram_media_downloader/discussions/categories/ideas](https://github.com/tangyoha/telegram_media_downloader/discussions/categories/ideas \"Feature Request\")\n*   **Report a Bug:** [https://github.com/tangyoha/telegram_media_downloader/issues](https://github.com/tangyoha/telegram_media_downloader/issues \"Report a Bug\")\n*   **Telegram Community:** [https://t.me/TeegramMediaDownload](https://t.me/TeegramMediaDownload \"Telegram Community\")\n*   **Contributing Guidelines:** [https://github.com/tangyoha/telegram_media_downloader/blob/master/CONTRIBUTING.md](https://github.com/tangyoha/telegram_media_downloader/blob/master/CONTRIBUTING.md \"Contributing Guidelines\")\n*   **Code of Conduct:** [https://github.com/tangyoha/telegram_media_downloader/blob/master/CODE_OF_CONDUCT.md](https://github.com/tangyoha/telegram_media_downloader/blob/master/CODE_OF_CONDUCT.md \"Code of Conduct\")\n*   **Sponsor (PayPal):** [https://paypal.me/tangyoha?country.x=C2&locale.x=zh_XC](https://paypal.me/tangyoha?country.x=C2&locale.x=zh_XC \"Sponsor via PayPal\")","metrics":{"detailViews":4,"githubClicks":3},"dates":{"published":null,"modified":"2025-11-14T20:01:02.000Z"}}