diff --git a/README.md b/README.md index 2f6470e..107e11f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you want to export you whole Spotify library, simply create a new playlist ca In order to add songs to our Apple Music library, we need their Apple Music identifier. Running `python3 retrieve-identifiers.py` will use the *spotify.csv* file to create a new file *itunes.csv* with each line consisting of the Apple Music identifier of a song in your Spotify library. ### 3. Use an intercepting proxy to retrieve the Apple Music request headers -Start iTunes and [Charles](http://www.charlesproxy.com) (or another intercepting proxy you like). Make sure SSL Proxying is enabled and working correctly. Next, select a random song on Apple Music you don't have in your library yet, right click and choose 'Add to library'. If everything went well, you're now able to view all the request headers in Charles of a request to `https://ld-4.itunes.apple.com/WebObjects/MZDaap.woa/daap/databases/1/cloud-add`. We're only interested in `Cookie`, `X-Dsid` and `X-Guid`. Copy the value of these header and paste them in the appropriate place in `insert-songs.py` (line 29 and further). +Start iTunes and [Charles](http://www.charlesproxy.com) (or another intercepting proxy you like). Make sure SSL Proxying is enabled and working correctly. Next, select a random song on Apple Music you don't have in your library yet, right click and choose 'Add to library'. If everything went well, you're now able to view all the request headers in Charles of a request to `https://ld-4.itunes.apple.com/WebObjects/MZDaap.woa/daap/databases/1/cloud-add`. ~~We're only interested in `Cookie`, `X-Dsid` and `X-Guid`.~~ From the issue reposts, we now recommend you to change the value of `Cookie`, `X-Dsid`, `X-Guid`, `User-Agent` and `X-Apple-Store-Front`. Copy the value of these header and paste them in the appropriate place in `insert-songs.py` (line 29 and further). Next, run `python3 insert-songs.py` and go grab a coffee. You're songs are now being imported into Apple Music. diff --git a/insert-songs.py b/insert-songs.py index b9c9bb5..94464fb 100644 --- a/insert-songs.py +++ b/insert-songs.py @@ -16,17 +16,17 @@ def add_song(itunes_identifier): data = construct_request_body(int(time.time()), itunes_identifier) headers = { - "X-Apple-Store-Front" : "143446-10,32 ab:rSwnYxS0", "Client-iTunes-Sharing-Version" : "3.12", "Accept-Language" : "nl-nl, nl;q=0.83, fr-fr;q=0.67, fr;q=0.50, en-us;q=0.33, en;q=0.17", "Client-Cloud-DAAP-Version" : "1.0/iTunes-12.2.0.145", "Accept-Encoding" : "gzip", "X-Apple-itre" : "0", "Client-DAAP-Version" : "3.13", - "User-Agent" : "iTunes/12.2 (Macintosh; OS X 10.10.4) AppleWebKit/0600.7.12", "Connection" : "keep-alive", "Content-Type" : "application/x-dmap-tagged", # Replace the values of the next three headers with the values you intercepted + "User-Agent" : "**REPLACE THIS**", + "X-Apple-Store-Front" : "**REPLACE THIS**", "X-Dsid" : "**REPLACE THIS**", "Cookie" : "**REPLACE THIS**", "X-Guid" : "**REPLACE THIS**",