Skip to content

Latest commit

Β 

History

69 Commits

Folders and files

Repository files navigation

🎬 TamilMV RSS Telegram Bot

An automated, high-performance Telegram bot that scrapes the latest torrent releases from 1TamilMV and posts them directly to your Telegram channel with thumbnails and metadata.

Python 3.10+ Pyrogram Docker License


✨ Features

  • πŸš€ Automated 1TamilMV Crawling: Automatically checks for new forum topics, direct download links, and torrent files every 5 minutes.
  • πŸ–ΌοΈ Movie Poster & Direct Link Posts: Fetches movie poster images and direct download links (e.g. Cyberloom), posting clean summary photo messages before sending torrent files.
  • πŸ“ Torrent File Delivery: Downloads and sends .torrent files directly to your channel with custom thumbnails, release metadata, and file sizes.
  • ⚑ Non-Blocking Asynchronous Engine: Web scraping and file downloads run on dedicated worker threads, ensuring Telegram MTProto keepalives never freeze.
  • πŸ›‘οΈ 24/7 Supervisor Recovery: Built-in background supervisor automatically catches transient network errors and restarts scraping cycles without crashing.
  • ⏳ Smart FloodWait Protection: Gracefully catches Telegram rate limits and retries automatically without spamming or dropping connections.
  • 🐳 VPS & Docker Ready: Includes docker-compose.yml and Dockerfile configured with restart: unless-stopped and unbuffered logging for rock-solid 24/7 uptime.
  • 🌐 Web Health Check: Integrated lightweight Flask server on port 5090 for platforms like Render, Koyeb, and Heroku.

πŸ“‹ Environment Variables

Create a .env file in the root directory (or configure them in your hosting provider):

Variable Required Description Example
TOKEN Yes Telegram Bot Token from @BotFather 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ
API_ID Yes Telegram API ID from my.telegram.org 1234567
API_HASH Yes Telegram API Hash from my.telegram.org 0123456789abcdef0123456789abcdef
OWNER Yes Telegram User ID of the owner (from @userinfobot) 1892771262
CHANNEL_ID Yes Target Channel ID (bot must be admin with Post permission) -1002194076115
PORT No Port for Flask web server (default: 5090) 5090
PROXY No Optional HTTP/HTTPS or SOCKS5 proxy to bypass ISP domain blocks http://127.0.0.1:8080 or socks5://127.0.0.1:1080
BASE_URL No Override starting base URL (defaults to auto-resolving from WWW.1TAMILMV.FI) https://www.1tamilmv.rocks

πŸš€ Deployment & Running

Option 1: Docker Compose on VPS (Recommended)

  1. Clone the repository:

    git clone https://github.com/GouthamSER/Tamilmv-Rss-Bot.git
    cd Tamilmv-Rss-Bot
  2. Configure environment variables:

    nano .env

    Paste your credentials into .env:

    TOKEN=your_bot_token
    API_ID=your_api_id
    API_HASH=your_api_hash
    OWNER=your_owner_id
    CHANNEL_ID=your_channel_id
  3. Start the bot in the background (24/7):

    docker compose up -d --build
  4. Monitor logs in real-time:

    docker compose logs -f
  5. Stop or Restart:

    docker compose restart
    docker compose down

πŸ–₯️ Running with tmux + Docker (Prevents SSH Disconnects)

Using tmux creates a persistent terminal session on your VPS so you can monitor live logs 24/7 without worrying about SSH terminal disconnects:

  1. Install tmux on your VPS:

    apt update && apt install -y tmux
  2. Create a new session:

    tmux new -s bot
  3. Start the bot & monitor logs:

    cd Tamilmv-Rss-Bot
    docker compose up -d --build
    docker compose logs -f
  4. Detach from tmux (safe to close SSH):

    • Press Ctrl + B, release, then press D.
  5. Reattach to check logs anytime:

    tmux attach -t bot

πŸ’‘ tmux Cheat Sheet

Action Command / Shortcut
New Session tmux new -s bot
Detach (Keep running) Ctrl + B then D
Reattach (Resume session) tmux attach -t bot
List Sessions tmux ls
Kill Session tmux kill-session -t bot
Scroll Logs Ctrl + B then [ (arrow keys to scroll, q to exit)

Option 2: Plain Docker CLI

  1. Build the image:

    docker build -t tamilmv-bot .
  2. Run the container with automatic restart:

    docker run -d \
      --name tamilmv-bot \
      --restart unless-stopped \
      --env-file .env \
      -p 5090:5090 \
      tamilmv-bot
  3. View live logs:

    docker logs -f tamilmv-bot

Option 3: Local Environment (Python)

  1. Clone the repository:

    git clone https://github.com/GouthamSER/Tamilmv-Rss-Bot.git
    cd Tamilmv-Rss-Bot
  2. Create a virtual environment & install requirements:

    python -m venv venv
    # On Linux/macOS:
    source venv/bin/activate
    # On Windows:
    venv\Scripts\activate
    
    pip install -r requirements.txt
  3. Run the bot:

    python bot.py

Option 4: Cloud Platforms (Render / Koyeb)

Render

  1. Fork or push this repository to GitHub.
  2. Create a new Web Service on Render.
  3. Connect your repository.
  4. Set:
    • Build Command: pip install -r requirements.txt
    • Start Command: python bot.py
  5. Add the required environment variables in the Environment tab.

Koyeb

  1. Create a new App on Koyeb.
  2. Connect your repository and select Dockerfile deployment.
  3. Configure the environment variables and deploy.

πŸ“Œ Important Notes

  • Channel Permissions: Ensure your bot is added as an Administrator in your target Telegram channel with permission to Post Messages.
  • First Run Caching: When the bot boots up for the first time, it records existing torrents in memory so it doesn't spam older posts. Only freshly uploaded torrents will be dispatched to your channel.
  • Auto-Restart on VPS: The --restart unless-stopped flag in Docker Compose guarantees that the bot will automatically come back online if your VPS reboots or experiences temporary disruptions.

πŸ‘₯ Contributors

  • MNTGXO β€” Original code & contributor

πŸ‘¨β€πŸ’» Credits & Contact


πŸ“„ License

This project is licensed under the MIT License. Feel free to modify and distribute.

Releases

Packages

Contributors

Languages