Skip to content

z0team/z0music

Repository files navigation

Logo

🎵 z0Music Bot

A Telegram bot that searches and downloads audio, then sends a properly tagged MP3.

🚀 Features

  • Search YouTube by song name
  • Download YouTube audio
  • Download SoundCloud audio through the configured Cobalt instance
  • Resolve Spotify track links through the Spotify Web API and download the matching YouTube source
  • Write a portable <song title>.mp3 filename, ID3 metadata, source URL, and cover art
  • Fast response
  • Clean and minimal interface

⚙️ Installation

  1. Clone the repository:

    git clone https://github.com/Mak5er/z0music.git
    cd z0music
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up your Telegram bot token:

    Create a .env file in the project root with the following content:

    BOT_TOKEN=your_telegram_bot_token
    COBALT_API_URL=https://your-cobalt-instance.example
    COBALT_API_KEY=your-cobalt-api-key
    
    # Required only for Spotify track links
    SPOTIFY_CLIENT_ID=your-spotify-client-id
    SPOTIFY_CLIENT_SECRET=your-spotify-client-secret
    SPOTIFY_MARKET=UA

    Create the Spotify values in the Spotify Developer Dashboard. The current implementation accepts Spotify track links. Album and playlist links are reserved for a later batch-download flow.

🛠️ Usage

  1. Run the bot using:

    python main.py
  2. OR Run with Docker:

    docker compose up -d --build

📁 Project Structure

├── main.py
├── handlers/
│   └── youtube.py
├── middlewares/
│   └── antiflood.py
├── services/
│   ├── audio.py
│   ├── cobalt.py
│   ├── spotify.py
│   └── youtube.py
├── downloads/
├── media/
│   └── z0music.png
├── requirements.txt
├── Dockerfile
└── docker-compose.yml

About

YT music downloader Bot on Telegram.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors