A lightweight tool that uses Spotify and Youtube to downloads tracks from any Spotify playlist to the user's local Music folder as mp3 files.
spotitube is a command-line program to download mp3 files of tracks in user Spotify playlists. It is not platform specific, and will run on Mac OS X, Windows, and Linux. It is released on public domain, so you can modify, redistribute, and use freely.
- youtube_dl
- requests
- spotipy
- eyeD3
- google_api_python_client
youtube_dl >= 2017.7.23
$ sudo -H pip install --upgrade youtube-dl
requests >= 2.11.0
$ pip install requests
spotipy >= 2.4.4
$ pip install spotipy
eyeD3 >= 0.8
$ pip install eyeD3
google_api_python_client >= 1.6.2
$ pip install --upgrade google-api-python-client
Go to your Spotify Playlist, right click, Share, copy URI:
To access user and public playlists, Spotify requires you to use their API which gives you a unique Client Key and a Client Secret Key relevant only to YOUR Spotify account.
- Login with your credentials here: https://developer.spotify.com/my-applications/#!/
- Go to My Applications on the sidebar and create an app. Your application name/description does not matter.
- Your Client ID and Client Secret Keys will be generated.
Using your keys and URI:
$ python spotify.py -c CLIENT -cs CLIENT_SECRET -u URI
usage: spotify.py [-h] [-c CLIENT] [-cs CLIENT_SECRET] [-u URI]
required arguments:
-c CLIENT, --client CLIENT Spotify client key
-cs CLIENT_SECRET, --client-secret CLIENT_SECRET Spotify client secret key
-u URI, --uri URI Spotify playlist URI
optional arguments:
-h, --help show this help message and exit
-a AUDIO_QUALITY, --audio-quality AUDIO_QUALITY Audio bitrate (128, 160, 192, 256*, 320 kbit/s)
- Spotipy - Lightweight Python Spotify API
- EyeD3 - Used to edit metadata with Python audio data toolkit (ID3 and MP3)
- Youtube_dl - Used to download Youtube videos/audio
- Google_api_python_client - Youtube API
- Alex Kim - Original author