Replace Spotify with Apple Music in the article. Same case. If Spotify wants others to play fair, it should start playing fair as well.
tell application "iTunes"
repeat with p in playlists
log name of p as string
end repeat
end tellhttps://www.producthunt.com/posts/stamp-2
Bit of a history now, but it was just an applescript that used CSV to click through iTunes.