Some simple python 3 scripts to help import your Apple Music playlists into Spotify playlists.
Web-app in Progress!
The first step is to select the playlists you want to import over and export them as an XML file. You do this buy selecting File -> Library -> Export Playlist. Save the resulting file as whatever you would like in the same directory as the directory you cloned this repo into.
Running the program will create playlists on spotify with the same names as the file names of the exported playlists (c.f Step 1).
Install spotipy (use pip3 install spotipy)
Install numpy (use pip3 install numpy)
Install python-dotenv (use pip3 install python-dotenv)
- Go to https://developer.spotify.com/dashboard/applications.
- Create an app with any name.
- Select the app.
- Select EDIT SETTINGS.
- Under Redirect URIs, enter
http://localhost:8888/callback
and select Add. Select SAVE. - Find Client ID and copy the value to the
client_id
variable in .env. - Select SHOW CLIENT SECRET. Copy the value to the
client_secret
variable in .env. - Go to https://spotify.com > Profile > Account.
- Copy the value of Username to the
username
variable in .env. - Save the edited file.
By using the terminal and navigating to the directory you cloned this repo into. Type in python3 musicMove.py to start the program. Follow the intended dirctions and BAM! Your Apple Music playlists are now Spotify playlists!
The script I'm using to retrieve the Spotify identifier for an Apple Music song simply compares the title, artist, and or album depending on search results. Some songs don't have the exact same title in both services which results in the script failing to retrieve an identifier for some songs. At this time the program transfers over 90% of the songs most of the time. The songs that do not get transfered over are printed out on the console for you to add them yourself if you wish.