How sudor2spr/1tamilmv_v2_bot works
Project type and purpose
• This is a single-service, webhook-driven Telegram bot (“tamilmv_v2_Bot”) written in Python.
• Purpose: Listen for user commands in Telegram, scrape Tamil movie torrent magnet links from a target site (TAMILMV_URL), and send them back to users.
File structure
• Top‐level config files:
• Dockerfile, docker-compose.yml, heroku.yml → containerization & deployment
• .github/workflows/*.yml → CI/CD pipelines (code scanning, PyPI publish)
• runtime.txt, requirements.txt, pyproject.toml, setup.py → Python environment & dependencies
• Source code directory:
• tamilmvbot/angel.py → main entry point (webhook server, command handler, scraper)
• Deployment helpers: run cmd.txt, Dockerignore
README for additional insights
• Defines required ENV variables: TOKEN, WEBHOOK_URL, TAMILMV_URL, PORT
• Deployment recipes for Render.com, Heroku, Koyeb
• Usage commands (/start, /view) and build/start commands
a. Main components
• Telegram Users (end users with Telegram client)
• Telegram Bot API / Telegram Servers (external webhook provider)
• Bot Service (Docker container hosting tamilmvbot.angel):
– Webhook Listener (HTTP server on PORT)
– Command Processor
– Scraper Module (HTTP client fetching data from TAMILMV_URL)
• External TamilMV Website (source of torrent links)
• CI/CD Pipeline (GitHub Actions building docker image, pushing, deploying)
• Hosting Platform (Render.com or Heroku)
b. Relationships & interactions
1. User sends message → Telegram Servers
2. Telegram Servers → POST webhook to Bot Service
3. Webhook Listener → Command Processor → invokes Scraper Module → HTTP GET to TamilMV_URL
4. Scraper extracts magnet links → Command Processor → sends HTTPS POST message back via Telegram Bot API
5. CI/CD workflows trigger on commit → build container → deploy to hosting
c. Architectural patterns & design principles
• Event-driven microservice (webhooks)
• Single responsibility: separate modules for HTTP, processing, scraping
• Container-based deployment (immutable infrastructure)
• Infrastructure as code (Docker, Docker Compose, Heroku/YML)
d. Key technologies & libraries
• Python 3.x (defined in runtime.txt/pyproject.toml)
• python-telegram-bot or similar HTTP webhook library
• requests or aiohttp for scraping
• Docker, Docker Compose, GitHub Actions, Render/Heroku