SkillAgentSearch skills...

RestrictedContentDL

Restricted Content Downloader: An advanced Telegram bot script to download restricted content such as photos, videos, audio files, or documents from Telegram private chats or channels. This bot can also copy text messages from Telegram posts.

Install / Use

/learn @bisnuray/RestrictedContentDL
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align="center">Restricted Content Downloader Telegram Bot</h1> <p align="center"> <a href="https://github.com/bisnuray/RestrictedContentDL/stargazers"><img src="https://img.shields.io/github/stars/bisnuray/RestrictedContentDL?color=blue&style=flat" alt="GitHub Repo stars"></a> <a href="https://github.com/bisnuray/RestrictedContentDL/issues"><img src="https://img.shields.io/github/issues/bisnuray/RestrictedContentDL" alt="GitHub issues"></a> <a href="https://github.com/bisnuray/RestrictedContentDL/pulls"><img src="https://img.shields.io/github/issues-pr/bisnuray/RestrictedContentDL" alt="GitHub pull requests"></a> <a href="https://github.com/bisnuray/RestrictedContentDL/graphs/contributors"><img src="https://img.shields.io/github/contributors/bisnuray/RestrictedContentDL?style=flat" alt="GitHub contributors"></a> <a href="https://github.com/bisnuray/RestrictedContentDL/network/members"><img src="https://img.shields.io/github/forks/bisnuray/RestrictedContentDL?style=flat" alt="GitHub forks"></a> </p> <p align="center"> <em>Restricted Content Downloader: An advanced Telegram bot script to download restricted content such as photos, videos, audio files, or documents from Telegram private chats or channels. This bot can also copy text messages from Telegram posts.</em> </p> <hr>

Features

  • 📥 Download media (photos, videos, audio, documents).
  • ✅ Supports downloading from both single media posts and media groups.
  • 🔄 Progress bar showing real-time downloading progress.
  • ✍️ Copy text messages or captions from Telegram posts.
  • 📤 Auto-forward of downloaded media/text to a defined channel or group.

Requirements

Before you begin, ensure you have met the following requirements:

  • Docker and Docker Compose installed on your system
  • A Telegram bot token (you can get one from @BotFather on Telegram)
  • API ID and Hash: You can get these by creating an application on my.telegram.org
  • To Get SESSION_STRING Open @TgDevToolBot. Bot and use 🔐 Pyrogram Session button and then follow all instructions

Note: All dependencies including Python, kurigram, pyleaves, tgcrypto, and ffmpeg are automatically installed when you deploy with Docker Compose.

Configuration

  1. Open the config.env file in your favorite text editor.

  2. Replace the placeholders for API_ID, API_HASH, SESSION_STRING, and BOT_TOKEN with your actual values:

    • API_ID: Your API ID from my.telegram.org.
    • API_HASH: Your API Hash from my.telegram.org.
    • SESSION_STRING: The session string generated using @TgDevToolBot.
    • BOT_TOKEN: The token you obtained from @BotFather.
    • FORWARD_CHAT_ID: Optional. Set a target channel/group chat ID (example: -1001234567890) to automatically copy downloaded content there. Leave empty to disable.
  3. Optional performance settings (add to config.py):

    • MAX_CONCURRENT_DOWNLOADS: Number of simultaneous downloads (default: 3)
    • BATCH_SIZE: Number of posts to process in parallel during batch downloads (default: 10)
    • FLOOD_WAIT_DELAY: Delay in seconds between batch groups to avoid flood limits (default: 3)

Deploy the Bot

  1. Clone the repository:

    git clone https://github.com/bisnuray/RestrictedContentDL
    cd RestrictedContentDL
    
  2. Start the bot:

    docker compose up --build --remove-orphans
    

The bot will run in a containerized environment with all dependencies (Python, libraries, FFmpeg) automatically installed and managed.

To stop the bot:

docker compose down

Usage

  • /start – Welcomes you and gives a brief introduction.

  • /help – Shows detailed instructions and examples.

  • /dl <post_URL> or simply paste a Telegram post link – Fetch photos, videos, audio, or documents from that post.

  • /bdl <start_link> <end_link> – Batch-download a range of posts in one go.

    💡 Example: /bdl https://t.me/mychannel/100 https://t.me/mychannel/120

  • /killall – Cancel any pending downloads if the bot hangs.

  • /logs – Download the bot’s logs file.

  • /cleanup – Remove temporary downloaded files from the server.

  • /stats – View current status (uptime, disk, memory, network, CPU, etc.).

Note: Make sure that your user session is a member of the source chat or channel before downloading.

Author

Note: If you found this repo helpful, please fork and star it. Also, feel free to share with proper credit!

View on GitHub
GitHub Stars224
CategoryContent
Updated6h ago
Forks160

Languages

Python

Security Score

85/100

Audited on Mar 21, 2026

No findings