Automate the download of your Spotify playlists.
Install ffmpeg.
Create a new application in the Spotify Dashboard to get your client id and client secret.
Create a new application in the Musixmatch Dashboard to get your api key.
$ pip install -r requirements.txt
# Spotify Credentials
$ export SPOTIPY_CLIENT_ID="your-client-id"
$ export SPOTIPY_CLIENT_SECRET="your-client-secret"
# Musixmatch Credentials
$ export MUSIXMATCH_API_KEY="your-api-key"
$ python spotomation/main.py
Create a file called env.list
that will contain all your environment variables.
SPOTIPY_CLIENT_ID=your_client_id
SPOTIPY_CLIENT_SECRET=your_client_secret
MUSIXMATCH_API_KEY=your_api_key
SPOTIFY_PLAYLIST_URI=your_playlist_uri
LOG_LEVEL=WARNING
Then, build the image and run it.
$ docker build -t python-spotomation .
$ docker run -it --env-file env.list -v "$(pwd)"/Downloads/:/Downloads/ python-spotomation
We can't really get the lyrics, as both the Genius and MusixMatch APIs are limited. Genius simply doesn't allow to return the lyrics for a song, while Musixmatch only return 30% of the lyrics for a song.
- requests (http api calls)
- spotipy (Spotify Python client)
- MusicBrainz (metadata)
- Musixmatch (lyrics)
- BeautifulSoup (html parsing)
- ffmpeg (conversion)
- pytube (Youtube video downloader)
- youtube-search (Youtube video search)
- eyeD3 (ID3 tags)
- tqdm (progress bar)