Follow the general instructions at https://github.com/simonschellaert/spotify2am .
This will export your Spotify playlist to csv and add the songs to your iTunes Library.
Notes:
For the proxy part I used https://mitmproxy.org/ instead of Charles. Charles isn't free.
mitmproxy is fairly easy to use, just don't forget to setup your HTTPS proxy server at 127.0.0.1 port 8080 (Settings -> Network -> Advanced -> Proxies).
If the insert_songs.py step doesn't work for you, try the one in this gist.
Note the TODO:REPLACE_THIS , you will get that info on mitmproxy when you add a new song from Apple Music to your Library.
For me, it showed up on a POST request to ld-7.itunes.apple.com
If that file doesn't work either, use mitmproxy to see all the other header info to update your request.
spotify2am will add all the songs to the general library. To create individual playlists once all the songs are added to your Library, do:
- convert the csv file exported in the process above to tab separated values https://github.com/sandeharsa/SpotifyToiTunes
- use iTunes -> File -> Library -> Import Playlist on your tab separated file. Playlist will have same name as your tab file.