Skip to content

Instantly share code, notes, and snippets.

@matthewnitschke
Created February 16, 2023 16:12
Show Gist options
  • Select an option

  • Save matthewnitschke/4f083a019db928778938fa532fc41adf to your computer and use it in GitHub Desktop.

Select an option

Save matthewnitschke/4f083a019db928778938fa532fc41adf to your computer and use it in GitHub Desktop.
Shell script to download images from spotify share urls
# Usage:
# ./spotify-artwork-downloader.sh <share_url> <share_url> <...>
SHARE_URLS=$@
for URL in $SHARE_URLS
do
DATA=$(curl "https://open.spotify.com/oembed?url=$URL")
THUMB_URL=$(echo $DATA | jq --raw-output '.thumbnail_url')
TITLE=$(echo $DATA | jq --raw-output '.title')
curl $THUMB_URL > "$TITLE.png"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment