A Python 3 script that exports all of your Spotify playlists, useful for paranoid Spotify users like me, afraid that one day Spotify will go under and take all of our playlists with it!
python3 spotify-backup.py playlists.txt
--format=json will give you a JSON dump with everything that the script gets from the Spotify API. If for some reason the browser-based authorization flow doesn't work, you can also generate an OAuth token on the developer site (with the
playlist-read-private permission) and pass it with the
Collaborative playlists and playlist folders don't show up in the API, sadly.