/spotify-downloader

Download Spotify playlists with albumart and meta-tags

Primary LanguagePythonMIT LicenseMIT

Spotify-Downloader

Build Status Docker Build Status

This is a more user friendly version of the fantastic Spotify Downloader of ritiek.

This is a list of some of its features:

  • Downloads songs from YouTube in an MP3 format by using Spotify metadata.
  • Functional UI based on ReactJS and MATERIAL-UI.
  • Search for songs, albums and playlist or simply copy the Spotify's HTTP link.
  • Fetch info from Spotify and play the songs using its web player.
  • Automatically applies metadata to the downloaded song
  • Works straight out of the box and does not require to generate or mess with your API keys (already included).

That's how it will look like!

snapshot_1 snapshot_2 snapshot_3

Usage

  • Run docker container:

    MUSIC_FOLDER={YOUR_MUSIC_DIRECTORY}
    docker run --restart=always --name spotify-downloader -p 5000:5000 -u `stat -c "%u:%g" $MUSIC_FOLDER` -d -v $MUSIC_FOLDER:/music alvsanand/spotify-downloader
  • For accessing the UI, go to http://localhost:5000.

  • In order to see the logs:

    docker logs $(docker ps -aq --filter name=spotify-downloader)

Development

Un order to run in development mode:

  • Start Flask server:

    sudo apt-get install build-essential python3-venv python3-dev
    
    python3 -m venv venv
    source venv/bin/activate
    pip install --upgrade pip
    pip install -r requirements.txt
    
    export LOCAL_MODE=True
    
    python app.py
  • Start react server:

    cd react-ui
    npm install
    npm run start

Running Tests

python3 -m venv venv
source venv/bin/activate

pip install pytest pytest-cov

python3 -m pytest tests

Disclaimer

Downloading copyright songs may be illegal in your country. This tool is for educational purposes only and was created only to show how Spotify's API can be exploited to download music from YouTube. Please support the artists by buying their music.