Skip to content

AABur/VideoGrabberBot

Repository files navigation

VideoGrabberBot

A Telegram bot for downloading videos and audio from YouTube with format selection options.

Python 3.11+ Aiogram License MIT

Disclaimer

This project is a personal educational initiative, created solely for learning purposes and is not intended for commercial use. It was developed to practice modern Python development techniques, asynchronous programming, and Telegram API interactions. Please respect copyright laws and platforms' terms of service when using this software.

Features

  • Video Downloads: Get videos from YouTube in multiple formats:
    • SD (480p)
    • HD (720p)
    • Full HD (1080p)
    • Original (Maximum available quality)
  • Audio Extraction: Extract high-quality MP3 (320kbps) audio from videos
  • Access Control: Restrict bot usage through invitation links or admin approval
  • Queue System: Asynchronous download queue for handling multiple requests
  • Error Handling: Comprehensive error handling with admin notifications
  • Modern Architecture: Built with asyncio, aiogram, and yt-dlp

How It Works

  1. Send a YouTube link to the bot
  2. Choose a format from the provided options
  3. Wait for download to complete
  4. Receive the file directly in your Telegram chat

Quick Start

Requirements

  • Python 3.11+
  • Telegram Bot API token (from BotFather)
  • uv package manager

Installation

  1. Clone the repository:

    git clone https://github.com/AABur/VideoGrabberBot.git
    cd VideoGrabberBot
  2. Initialize the project:

    make init
  3. Configure the bot: Edit the .env file with your tokens:

    TELEGRAM_TOKEN=your_telegram_token
    ADMIN_USER_ID=your_telegram_user_id
    
  4. Run the bot:

    make run

Docker Deployment

If you prefer Docker:

  1. Clone and configure:

    git clone https://github.com/AABur/VideoGrabberBot.git
    cd VideoGrabberBot
  2. Run with Docker:

    make docker-start

    This will create a .env file from .env.example template. Edit it with your tokens.

  3. Stop when needed:

    make docker-stop

Technologies

  • aiogram - Modern Telegram Bot framework
  • yt-dlp - Powerful YouTube downloader
  • aiosqlite - Async SQLite database
  • loguru - Advanced logging
  • uv - Fast Python package installer and resolver

Development

Interested in contributing? Check out CONTRIBUTING.md for development setup, coding guidelines, and contribution workflow.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Telegram bot for downloading videos and audio from YouTube with format selection options.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •