Python 3 script that pulls a song's metadata from Spotify using a track URI or URL as input and outputs a script filter-compatible JSON for Alfred.
pip install spotipy
Create a creds.json
file in the working directory of the script with your Spotify credentials using this template:
{
"client_id": "YOUR_SPOTIFY_CLIENT_ID",
"client_secret": "YOUR_SPOTIFY_CLIENT_SECRET"
}
Example shell script for "script" section of Alfred script filter object:
/usr/local/bin/python3 spotify-meta-tool.py $1
All included icons by Icons8.