Skip to main content

spotidl: download songs, albums and playlists using Spotify links

Project description

Introduction

spoti-dl(I had a better name but that was already taken on PyPi), is a song downloader app that accepts Spotify links, fetches individual song—and basic album—metadata from Spotify, downloads the song from Youtube. The metadata is then written onto the downloaded song file using the trusty Mutagen library, this includes the album/song cover art as well.

The app currently supports downloading songs, albums and playlists.

Setup

Run pip install spoti-dl to install the app first and foremost.

spoti-dl needs two things to work: FFmpeg and a Spotify developer account.

Steps to make a Spotify developer account:

  1. Go to Spotify Dev Dashboard
  2. Login with your credentials and click on "create an app".
  3. Enter any name of choice, app description, tick the checkbox and proceed.
  4. Now you have access to your client ID. Click on "Show client secret" to get your client secret.
  5. From here, click on "edit settings" and in the "redirect URIs" section add any localhost URL. I personally use http://localhost:8080/callback

Finally, define these three environment variables:

SPOTIPY_CLIENT_ID
SPOTIPY_CLIENT_SECRET
SPOTIPY_REDIRECT_URI

Also note that the first time you run the app you might get a popup window in your browser asking to integrate your account to the app you just created in the Spotify app dashboard. Accept and close the window.

Usage

spotidl <spotify link>

as an example, running this would download Rick Astley's 'Never Gonna Give You Up'-

spotidl https://open.spotify.com/track/4PTG3Z6ehGkBFwjybzWkR8?si=06f5d7ab5bd240e7

The following audio formats are supported:

  • mp3
  • flac

The following bitrates are supported:

  • best
  • 320kbps
  • 256kbps
  • 192kbps (slightly better than Spotify's 'high' audio setting, this is the bare minimum in my opinion to have a good listening experience)
  • 96kbps
  • 32kbps
  • worst

Again, the following link types are supported:

  • song links
  • album links
  • playlist links

Note: File names (audio files or folder names (eg., playlist's directory name) are changed to ensure compatibility with the operating systems since many characters like '?' or the '/' are illegal when making files/folders.

Flags

Flag Long Flag Usage
-h --help shows all the argument flags and their details
-d --dir the save directory to use while downloading
-q --quiet changes the verbosity level to be "quiet"
-c --codec the codec to use for downloads
-b --bitrate set the bitrate to use for downloads
-v --version displays the current app version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spoti-dl-1.0.5.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

spoti_dl-1.0.5-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file spoti-dl-1.0.5.tar.gz.

File metadata

  • Download URL: spoti-dl-1.0.5.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Linux/5.10.60.1-microsoft-standard-WSL2

File hashes

Hashes for spoti-dl-1.0.5.tar.gz
Algorithm Hash digest
SHA256 f44731d8819011a371a73a5ce75f1c231ccdce07791dd7dae5d64236159305a4
MD5 c40e5c4833d85a79c0cecb2fb88ff3dc
BLAKE2b-256 30d3d496a00d16f48ceffc9dbcd735362c5a1104c47171ad6d21d2a5061e5d7b

See more details on using hashes here.

File details

Details for the file spoti_dl-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: spoti_dl-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Linux/5.10.60.1-microsoft-standard-WSL2

File hashes

Hashes for spoti_dl-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8121401effc70f467f2601cc24431855b1e32ed3a933220b2d074137931f3389
MD5 83bd17d67cfd3bda728b1f16c2e16a2b
BLAKE2b-256 d8f54d45dddd9faa504e770c4a2403baf282176b0477587f16b6c66a3f81f45e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page