simonschellaert / spotify2am

Import your Spotify library into Apple Music
360 stars 68 forks source link

HTTP Error 404: Apple WebObjects #26

Closed benmarten closed 9 years ago

benmarten commented 9 years ago

I am getting a 404 error... Any idea what's wrong?

Ben@Bens-MacBook-Pro ~/N/spotify2am> python3 retrieve-identifiers.py 
New Americana - Halsey => 1013141957
Ben@Bens-MacBook-Pro ~/N/spotify2am> python3 insert-songs.py 
Something went wrong while inserting 1013141957 : HTTP Error 404: Apple WebObjects

headers = {
    "Host": "ld-4.itunes.apple.com:443",
    "Proxy-Connection": "keep-alive",
    "X-Apple-Store-Front": "143441-1,32",
    "Client-iTunes-Sharing-Version": "3.12",
    "Accept-Language": "en-us, en;q=0.50",
    "Client-Cloud-DAAP-Version": "1.0/iTunes-12.2.2.25",
    "Accept-Encoding": "gzip",
    "X-Apple-itre": "0",
    "Content-Length": "77",
    "Client-DAAP-Version": "3.13",
    "User-Agent": "iTunes/12.2.2 (Macintosh; OS X 10.10.5) AppleWebKit/600.8.9",
    "Connection": "keep-alive",
    "Content-Type": "application/x-dmap-tagged",
    "X-Dsid": "160719XXXX",
    "Cookie": "a=QQABAAAAXXXX=; isPpuOptOut=1; itspod=56; mz_at0-1607190730=AwQAAAEBAAHVXXXXXwMCI=; ns-mzf-inst=183-84-443-220-12-8188-562333-56-st13; s_fid=528F01B78XXXXXXXXXX; s_vi=[CS]v1|XXXX[CE]; s_vnum_n2_us=4|1; TrPod=4; xp_ci=3z14G3xXXXXXXXXX",
    "X-Guid": "6003089XXXX"
}
benmarten commented 9 years ago

Seems apple has updated their api or sth. but the old version still works ;) this one works for me now...

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.2 (Macintosh; OS X 10.10.5) AppleWebKit/600.8.9",
    "Connection" : "keep-alive",
    "Content-Type" : "application/x-dmap-tagged",
    # Replace the values of the next three headers with the values you intercepted
    "X-Dsid": "160719XXXX",
    "Cookie": "a=QQABAAAAXXXX=; isPpuOptOut=1; itspod=56; mz_at0-1607190730=AwQAAAEBAAHVXXXXXwMCI=; ns-mzf-inst=183-84-443-220-12-8188-562333-56-st13; s_fid=528F01B78XXXXXXXXXX; s_vi=[CS]v1|XXXX[CE]; s_vnum_n2_us=4|1; TrPod=4; xp_ci=3z14G3xXXXXXXXXX",
    "X-Guid": "6003089XXXX",
    "Content-Length" : "77"
}
benmarten commented 9 years ago

oh it seems it didn't work at all.... I'll open a new issue.... for this