Skip to content

Instantly share code, notes, and snippets.

@darraghmckay
Last active April 3, 2023 22:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darraghmckay/ed18da0ae225d82ef754a09d40735d4b to your computer and use it in GitHub Desktop.
Save darraghmckay/ed18da0ae225d82ef754a09d40735d4b to your computer and use it in GitHub Desktop.
Extract all spotify track URIs from a whatsapp conversation
$$('[tabindex="-1"] a').map(a => a.textContent).filter(link => /open\.spotify\.com\/track\/(.+)\?.+/.test(link)).map(trackLink => `spotify:track:${/open\.spotify\.com\/track\/(.+)\?.+/.exec(trackLink)[1]}`).join('\n')
@darraghmckay
Copy link
Author

darraghmckay commented Apr 10, 2019

  • Simply Open your whatsapp web conversation
  • Open the Links part of your media
  • Scroll all the way down to the bottom until all links are loaded
  • Paste this into the console
  • Copy and paste the resulting output into a spotify playlist (it will ask you if you want to skip duplicates)

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