Skip to content

Shewiiii/SpotifyDL

Repository files navigation

SpotifyDL

A rudimentary Spotify Downloader based on Librespot.

Features

  • Download tracks from Spotify in OGG 320kbps with metadata.
  • Adds a direct download option to the Spotify desktop client (via Spicetify).

Setup

You can jump to Spicetify integration if you want to use the downloader directly from the Spotify client.

Downloader

Requirements: Python 3.10 or newer, Spotify Premium, a Spotify app for API calls.

  • Copy the repo and install the dependencies (use a venv as needed).
pip install -r requirements.txt
  • Run .main.py and follow the instructions.
python main.py

If you struggle to generate the credentials.json file (eg. you are running the script on a server), run the script locally, connect to the "librespot" device from a Spotify client on the same computer, then export the file to the root folder of SpotifyDL.

Supported query: song title, Spotify URL (track, album or public playlist).

Spicetify integration

Example

Requirements: Python 3.10 or newer, Spotify Premium, a Spotify app for API calls, Spicetify.

  • Install the dependencies to run spicetify_server.py (Flask server, use a venv as needed).
pip install -r spicy_requirements.txt
  • Locate the Spicetify Extensions folder:
spicetify config-dir
  • Copy or move spotifyDL.js into the Extensions folder.
  • Enable the extension:
spicetify config extensions spotifyDL.js
spicetify apply
  • Run spicetify_server.py
python spicetify_server.py

Tip

You may want to create a script to run the server more easily. For example on Windows:

# In SpotifyDL.bat
cd /path/to/SpotifyDL
".venv/Scripts/python.exe" spicetify_server.py

Config

You can change the following in config.py:

  • Track folder
  • Reveal songs in file explorer after download
  • Try FLAC files download (will not work)

About

A rudimentary Spotify Downloader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published