I made a very simple script to save all Apple Music playlists as a single JSON containing playlist name, artist, song title and ISRC identifier (which can be used to find song elsewhere and migrate the library). Run locally after getting Apple authorization token from browser session.