Skip to main content

spoti-dl: download songs, albums and playlists using Spotify links

Project description

Downloads Downloads

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

spoti_dl-2.0.0-cp38-abi3-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.8+ Windows x86-64

spoti_dl-2.0.0-cp38-abi3-manylinux_2_31_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.31+ x86-64

spoti_dl-2.0.0-cp38-abi3-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

File details

Details for the file spoti_dl-2.0.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: spoti_dl-2.0.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for spoti_dl-2.0.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c71a2307f51a895a9e132fe9780dee26a2e99ee8212385240c258cd9dff58a12
MD5 623ada54da41a8705ec1ee41dbe24e1a
BLAKE2b-256 3f0b6417195e2b760a5cdfa5b1817ea72c3925e846fc6a1610d817b43584cd91

See more details on using hashes here.

File details

Details for the file spoti_dl-2.0.0-cp38-abi3-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for spoti_dl-2.0.0-cp38-abi3-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 dd292150c8dff7bf82365d55a2ea06d22a1a3470e6c566dae3f6252e18a3d030
MD5 1286621a3f7c0ac5a4e415bdfa0dcb43
BLAKE2b-256 9ce71a1fa7663fffda9c746279acb34e9e7c1199f35b0cf9a97031850b26e31a

See more details on using hashes here.

File details

Details for the file spoti_dl-2.0.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spoti_dl-2.0.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99f36c0972fad9341c4df9abdbd89f86911a098d0099f1cf1e666b7b4cfc5c49
MD5 27e169428a560b1a7cc37abf113ac0c6
BLAKE2b-256 f1f007979b11c1dadbbd52ad413a1a23b133f50ad6a4ca99d14423677c6da58d

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