bot
Production & Active

Bale Downloader Bot

Multi-purpose Bale messenger bot for downloading media from YouTube & Instagram, MP3 audio extraction, image processing, PDF compilation, and AI tools.

Bale Downloader Bot Showcase

Overview

Bale Downloader Bot (@PerYTDownloaderbot) is a powerful Python-based automation bot tailored for the Bale messenger ecosystem via webhook and polling architectures (tapi.bale.ai). It empowers users to download YouTube videos across varying resolutions (144p to 720p) and extract audio as high-fidelity MP3 files or ZIP packages. Beyond video downloading, it features an image manipulation suite (PDF compilation from up to 20 photos, image format conversion, and resizing), Instagram/TikTok reel downloading, Shazam-like music identification, AI chat assistance, and OCR text extraction backed by an asynchronous processing queue.

Key Benchmark:

10+ multi-media modules with sub-3s response time on Bale Messenger API

Key Engineering Features

YouTube video downloading across multiple quality options (144p through 720p) using optimized yt-dlp pipelines
Direct high-fidelity MP3 audio extraction with metadata tagging and fallback ZIP archives for large tracks
Smart channel searching, top-5 video discovery, and instant delivery via shared file caching
Batch Image to PDF converter: merges up to 20 images into a compact PDF document using Pillow
Comprehensive image manipulation tools: format conversion (PNG/JPG/WEBP/BMP), resizing, and AI background removal
Direct link media extraction for Instagram Reels, Posts, and trending TikTok clips
Shazam-like audio fingerprinting to identify music tracks from recorded voice notes or video clips
AI capabilities including conversational chat assistant, optical character recognition (OCR), and text-to-speech synthesis
Asynchronous worker queue architecture (asyncio) with automated disk cleanup for files older than 2 hours

Key Technical Challenges & Solutions

1Bale platform upload limits and large YouTube media handling

Implemented a dual delivery mechanism: direct video/audio dispatch for sub-50MB files and automated multi-part ZIP packaging for larger media with persistent SHA256 caching.

2Server disk saturation prevention from accumulated media files

Engineered an asynchronous JobQueue routine executing every 2 hours that safely purges downloaded media files older than 7,200 seconds while retaining metadata in cache.

Project Specifications

Category
bot
Engineering Role
Python Backend & Bot Architect
Bale Bot ID:
@PerYTDownloaderbot
Status
Production & Active

Technical Architecture & Stack

Bot Architecture & Runtime
Python 3.10+
python-telegram-bot 20.x
Bale Bot API (tapi.bale.ai)
Webhook & Polling
Asyncio Worker Queue
Media Engines & FFmpeg
yt-dlp
FFmpeg
Pillow (PIL)
Mutagen (ID3 Tags)
ShazamIO Engine
Web Automation & AI
Playwright (Chromium)
BeautifulSoup4
OpenAI API
Tesseract OCR Engine
Data & Storage
aiosqlite / SQLite
PostgreSQL
Shared Hash Cache
Automatic GC Cleaner