How ersizyka/telegram-video-downloader-userbot works
This is a self-hosted Telegram video-downloader userbot. A whitelisted user submits a link, chooses quality (and playlist items when applicable), then a persistent FIFO worker downloads and uploads the video to a configured Telegram channel. The graph also includes history/dedup, admin controls, and the local control API. Edges use README statements or SOURCE INDEX references; unsampled API-to-panel wiring is shown as unverified.
Main entry points: handlers.py Message handlers · run.py Bot startup · __init__.py Extractor registry · api.py Local control API
Components 19
User interaction
- Telegram client
bot/client.py - Message handlers
bot/handlers.py
Video extraction
- Extractor registry
bot/extractors/__init__.py - Site extractors
bot/extractors - Browser fallback
bot/extractors/universal.py - Browser extraction core
bot/extractors/base.py
Download and delivery
- Download and media prep
bot/downloader.py - FIFO queue worker
bot/handlers.py - Parallel Telegram upload
bot/fasttelethon.py
State and control
- Bot startup
run.py - User whitelist
bot/whitelist.py - Persistent queue
bot/queue.py - Download history
bot/history.py - Progress reporting
bot/progress.py - Local control API
bot/api.py - Local panel
panel.py - Logging
bot/logging_config.py
Other components
- Whitelisted user
- Telegram
Connections 21
- Whitelisted user → Message handlers: submits links
README.md - Message handlers → User whitelist: checks access
bot/handlers.py - Message handlers → Extractor registry: resolves link
bot/handlers.py - Extractor registry → Site extractors: selects extractor
bot/extractors/__init__.py - Extractor registry → Browser fallback: offers fallback
bot/extractors/__init__.py - Browser fallback → Browser extraction core: uses browser core
bot/extractors/universal.py - Message handlers → FIFO queue worker: starts worker
bot/handlers.py - FIFO queue worker → Persistent queue: reads and updates
README.md - FIFO queue worker → Download and media prep: downloads video
bot/handlers.py - FIFO queue worker → Parallel Telegram upload: uploads media
bot/handlers.py - FIFO queue worker → Download history: records outcomes
bot/handlers.py - Message handlers → Download history: checks prior result
bot/handlers.py - Message handlers → Progress reporting: updates status
bot/handlers.py - Bot startup → Telegram client: creates client
run.py - Bot startup → Message handlers: registers handlers
run.py - Bot startup → Local control API: starts API
run.py - Local control API → Message handlers: uses live bot state
bot/api.py - Local panel → Local control API: controls bot
- Telegram client → Telegram: connects to
bot/client.py - Parallel Telegram upload → Telegram: sends videos
README.md - Bot startup → Logging: configures logging
run.py