a script that allows you to download spotify songs or playlists , written in python
This README would normally document whatever steps are necessary to get spotify-dl up and running.
- spotify-dl allows you to download spotify songs or playlist
- Version 0.0.2
- This repo contains spotify-dl source code
to use spotify-dl , you need to install thoses packages :
- bs4
- youtube-dl
- ffmpeg (for windows)
you can use brew to install youtube-dl :
$ brew install youtube-dl
and pip to install bs4
$ pip install beautifulsoup4
use apt-get install to install youtube-dl
$ sudo apt-get install youtube-dl
and pip to install bs4
$ pip install beautifulsoup4
- download youtube-dl and ffmpeg to the same folder as spotify-dl
- put the folder on the %PATH% variable in Windows
- restart computer to use
you can either use your spotify account or downloading single track or playlist by providing an ID , ex:
$ ./spotify-dl --track {spotify_song_id} --dl youtube
this will download the track and save it as mp3 format
you can get the song ID by getting the spotify URI of the song
{spotify_song_id_ex} : 28Ct4qwkQXY2W5yyNCLuVI
The new version of the spotify api require an access_token for requests, you can check out https://developer.spotify.com/migration-guide-for-unauthenticated-web-api-calls/.
the new patch of spotify-dl have a new argument called: --access_token , so the new usage of spotify-dl would be:
$ ./spotify-dl --track {spotify_song_id} --dl youtube --access_token <your_access_token>
you can get the access token from the url generated while executing :
$ ./spotify-dl --gen_url
you also have to create an application on https://developer.spotify.com/
change:
CLIENT_ID=""
CALL_BACK_URL=""
- Hamza Bourrahim