Skip to main content

download tracks and playlists on spotify;

Project description

spotish

download tracks and playlists on spotify;

install

install spotish with pip:

pip install spotish

usage

to use spotish, you need to create a spotify application:

  1. go to https://developer.spotify.com/dashboard/applications and log in;

  2. click create a client id;

  3. fill in any name and description, then choose desktop app;

  4. on next page, when asked are you developing a commercial integration?, choose no;

  5. on next page, tick all boxes and click submit;

  6. now the app is created; the app page lists its client id and client secret, which will be used when you run spotish; we also need a redirect uri, so click edit settings;

  7. add http://localhost/callback/ in redirect uris; this uri will be used when you run spotish;

  8. click save;

now we have a spotify username, a client id, a client secret and a redirect uri;

download tracks

to download saved tracks into the default out dir:

spotish --user {username} \
    --client-id {client_id} --client-secret {client_secret} \
    --redirect-uri {redirect_uri} \
    tracks

on first run, this will open a web browser and ask you to enter the redirect uri to authenticate; simply follow the instructions; this will generate a hidden cache file named .cache-{username} in current dir, containing spotify web api access token; later runs of spotish dont need authentication until the access token expires;

tracks are organized by their albums; both albums and tracks are named after their uuids; an album uuid contains total tracks in album, album uri and album name; a track uuid contains track number within the album, track uri and track name; album and track uris already guarantee uniqueness; however, uuids contain more information and are easier to visualize; by using uuids, tracks within an album are automatically sorted by their track numbers, which looks very nice;

to download saved tracks with more complete metadata and helpful progress text:

spotish --user {username} \
    --client-id {client_id} --client-secret {client_secret} \
    --redirect-uri {redirect_uri} \
    --output {dir} \
    --album-image --track-preview \
    --verbose \
    tracks

download playlists

to download saved playlists, use command playlists instead of tracks:

spotish --user {username} \
    --client-id {client_id} --client-secret {client_secret} \
    --redirect-uri {redirect_uri} \
    --output {dir} \
    --playlist-image --track-preview \
    --verbose \
    playlists

tracks are organized by their playlists, not albums; both playlists and tracks are named after their uuids; a playlist uuid contains playlist index, playlist uri and playlist name; a track uuid contains track index within the playlist, track uri and track name;

depend

spotish depends on:

license

Copyright (c) 2012-2018 Cyker Way

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

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

spotish-1.2.5.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

spotish-1.2.5-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file spotish-1.2.5.tar.gz.

File metadata

  • Download URL: spotish-1.2.5.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2

File hashes

Hashes for spotish-1.2.5.tar.gz
Algorithm Hash digest
SHA256 ce0a1ce024dffea1d9cb7afeed72b65211ba31fff4e5fe2277756603e8358ce6
MD5 4ddc5d58974565473224a8c00b51c279
BLAKE2b-256 8b8a1c21ffbd8ac2f14f4bb89c86b17e5a3f63917844ace4f3302237aa7c924e

See more details on using hashes here.

File details

Details for the file spotish-1.2.5-py3-none-any.whl.

File metadata

  • Download URL: spotish-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.0b1

File hashes

Hashes for spotish-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 46313cd9b3bee01322b3b5a115c9ad17dce0859d854216dbb8b83eb6fa7e186c
MD5 e95e7ad7ddff64110e2a435938142e31
BLAKE2b-256 1bdbc6b5ea39bdc929cd5ba447e0eadc3e8da771daf80a50a1d9e7a8e451ffed

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