Skip to content

Daniel-191/Spotify_Downloader

Repository files navigation

🎵 Spotify Downloader

Download your Spotify playlists, albums, and tracks for free! This script takes a Spotify link (album, playlist, or track) and downloads the corresponding audio directly from YouTube, converting it with ffmpeg.


✨ Features

  • 🔗 Paste a Spotify link (playlist / album / track) and let the script do the rest
  • 📂 Downloads full playlists, albums, or single tracks
  • 🎶 Converts audio to MP3 format using ffmpeg
  • 🎨 Beautiful colored console output with progress bars
  • 🖥️ Modern PyQt6 GUI - Clean, modern desktop interface
  • 🌐 Web Interface - Gradio-based web UI for browser access
  • ⚡ Simple setup with automated installation scripts
  • 🖥 Cross-platform support: Windows, macOS, Linux
  • 🔄 Multiple extraction methods - Tries different approaches to fetch track lists
  • Error handling - Automatically retries failed downloads

📦 Requirements

Make sure you have the following before starting:

  • Python 3.10+
  • ffmpeg (required for MP3 conversion)
  • Internet connection (to fetch from Spotify + YouTube)

🔧 Installation

1. Clone the repository

git clone https://github.com/Daniel-191/collaborative
cd collaborative

2. Install dependencies

  • Windows: Double-click install.bat or run:

    install.bat
  • macOS/Linux (Terminal):

    chmod +x install.sh
    ./install.sh
  • Manual Installation:

    pip install -r requirements.txt

3. Install ffmpeg

You'll need ffmpeg installed and accessible in your system PATH.

  • Windows:

    1. Download ffmpeg from ffmpeg.org/download.html
    2. Extract the downloaded ZIP file to a folder
    3. Add ffmpeg to your system PATH:
      • Open System PropertiesEnvironment Variables
      • Under System Variables, find and edit Path
      • Add the path to ffmpeg's bin folder
      • Click OK to save
    4. Restart your command prompt and verify with: ffmpeg -version

    Need help? Watch this tutorial for guidance: https://www.youtube.com/watch?v=jZLqNocSQDM&t=33s

  • macOS (Homebrew):

    brew install ffmpeg
  • Linux (Debian/Ubuntu):

    sudo apt update
    sudo apt install ffmpeg
  • Linux (Fedora):

    sudo dnf install ffmpeg
  • Linux (Arch):

    sudo pacman -S ffmpeg

🚀 Usage

Choose Your Interface

This application offers three different interfaces:

1️⃣ Desktop GUI (PyQt6) - Recommended

Launch the modern desktop application:

  • Double-click run_gui.pyw
  • Or run: python run_gui.pyw

2️⃣ Web Interface (Gradio)

Launch the web-based interface:

python main.py
# or
python3 main.py

Access through your browser at http://localhost:7860

3️⃣ Command Line Interface (CLI)

For terminal users:

python cli.py "https://open.spotify.com/playlist/..."

Using the Downloader

When prompted, paste a Spotify link:

  • Trackhttps://open.spotify.com/track/... → downloads the song
  • Albumhttps://open.spotify.com/album/... → downloads all songs in the album
  • Playlisthttps://open.spotify.com/playlist/... → downloads the entire playlist

The script will:

  1. Extract track information from Spotify
  2. Search for each track on YouTube
  3. Download the best audio match
  4. Convert to MP3 format
  5. Save to the downloaded/ folder

🖥 Supported Operating Systems

  • ✅ Windows
  • ✅ macOS
  • ✅ Linux

📝 Dependencies

This project uses the following Python packages:

Package Purpose
yt-dlp YouTube downloading
requests HTTP requests to Spotify
colorama Colored terminal output
urllib3 HTTP client utilities
gradio Web interface
PyQt6 Desktop GUI framework

External Dependencies:

  • FFmpeg - Audio conversion (must be installed separately)

Warning

This project is for educational purposes only. Downloading copyrighted content without permission may violate copyright laws. Please support artists by streaming legally on Spotify or purchasing their music.