Skip to content

Instantly share code, notes, and snippets.

@rebebop
Created April 28, 2020 13:55
Show Gist options
  • Save rebebop/784cebea80b59c28aa696c148e743d8c to your computer and use it in GitHub Desktop.
Save rebebop/784cebea80b59c28aa696c148e743d8c to your computer and use it in GitHub Desktop.
How to export your shazam playlist
  • Login to your shazam account, go to your library page (https://www.shazam.com/myshazam)

  • Run the following in the console to get the track listing with song title and artist

document.querySelectorAll('.details').forEach((elem) => play.push(elem.textContent))
  • This will give you an array of track listings

  • Click on the array (in the console) and select Copy object (e.g. in Firefox); the idea is to copy the array from the console.

  • Paste that into a file and you’ll see songs listed one in each line

  • Save this file e.g. shazam_songs.txt

  • Install youtube-dl if you haven’t already

  • Run this command to download the playlist

youtube-dl -a shazam_songs.txt --default-search ytsearch -x

This will download all the songs, you can add --audio-format mp3 to download them in mp3 format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment