A Telegram bot that downloads tracks and albums from Spotify as MP3 with embedded cover art.
- Send a Spotify link to the bot
- Bot fetches track metadata from Spotify API (including ISRC)
- Audio is found on YouTube via ISRC for accurate matching
- Cover art is resized and embedded into the MP3
- Bot sends you the audio file in Telegram
- Python 3.12+
- FFmpeg (place
ffmpeg.exeandffprobe.exein project folder) - Telegram Bot Token
- Spotify API credentials
pip install -r requirements.txtCreate a .env file:
BOT_TOKEN=your_telegram_bot_token
SPOTIPY_CLIENT_ID=your_spotify_client_id
SPOTIPY_CLIENT_SECRET=your_spotify_client_secret
- Telegram token: https://t.me/BotFather
- Spotify credentials: https://developer.spotify.com/dashboard
python main.py| Type | Example |
|---|---|
| Track | open.spotify.com/track/... |
| Album | open.spotify.com/album/... |
| Playlist | open.spotify.com/playlist/... |
| Short link | spotify.link/... |
spotify_music_downloader/
├── main.py # Bot + handlers
├── downloader.py # Spotify API + YouTube download logic
├── requirements.txt
├── .env # Credentials (not in git)
├── ffmpeg.exe
├── ffprobe.exe
├── downloads/ # Temporary files (auto-created)
└── logs/ # Log files (auto-created)