tg-media-bot

Telegram bot that downloads media from 1000+ sites with yt-dlp and sends it back — tagged MP3s, inline video, 2 GB uploads.

Built 2025
Python aiogram yt-dlp Docker
Terminal showing tg-media-bot fetching a link

A Telegram bot that acts as a personal media downloader. Send it a link from YouTube, SoundCloud, or a thousand other sites, and it downloads the content with yt-dlp, converts if needed, and sends the file back through Telegram. MP3s come tagged, short videos play inline, and large files upload up to 2 GB.

Project facts

Scope

  • Telegram bot interface with inline progress bar
  • yt-dlp integration for 1000+ site support
  • MP3 conversion with automatic ID3 tagging
  • Inline video playback for short clips
  • 2 GB upload support via Telegram Bot API

Implementation highlights

  • Built a streaming progress bar that updates in-place during downloads.
  • Implemented cookies.txt injection for age-restricted and geo-locked sites.
  • Added retry logic for transient network failures during large uploads.

Outcome

A personal media bot that handles any link I throw at it — music, video, podcasts — and sends the file back in the right format.

What I'd improve now

Add playlist support, scheduled downloads, and a web dashboard for history.