Created
February 16, 2023 16:12
-
-
Save matthewnitschke/4f083a019db928778938fa532fc41adf to your computer and use it in GitHub Desktop.
Shell script to download images from spotify share urls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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