That's rather odd, his script works fine for me. What country are you in? Is there an iTMS in your country? Maybe that's the problem, we recently got iTMS here in New Zealand. Does this link work for you? http://a1.phobos.apple.com/r10/Music/32/a3...zi.dbjwyonx.jpg
For me it only works in firefox, for some reason. BTW the quality is amazing, better than I've seen from any other source, it's definately not a scan.
Edit: Noticed that the problem you quoted occurred on his webserver, so country shouldn't affect it, still, odd that it's working perfectly here.
Well, his webserver script is up and running again for me, so must have been some sort of temporary glitch. The problem is that the boo script is still downloading the encrypted version. I can't see any source code for what Josh has done at all, but a guess at just removing the .enc.jpg?... bit by adding the line:
url = System.Text.RegularExpressions.Regex("\\.enc\\.jpg\\?.*").Replace(url, ".jpg")
seems to do the job:
# refs: ICSharpCode.SharpZipLib.dll System.Windows.Forms
namespace CoverSources
import System.Xml
import System.Drawing
import util
class iTMS:
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="iTunes/7.0 (Macintosh; U; PPC Mac OS X 10.4.7)"
request.Headers.Add("X-Apple-Tz","7200")
request.Headers.Add("X-Apple-Store-Front","143457")
request.Headers.Add("Accept-Language","en-us, en;q=0.50")
request.Headers.Add("Accept-Encoding","gzip, x-aes-cbc")
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "iTunes Music Store"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
x=System.Xml.XmlDocument()
t=GetPageSecret("http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZSearch.woa/wa/coverArtMatch?an="+EncodeUrl(artist)+"&pn="+EncodeUrl(album))
x.Load(ICSharpCode.SharpZipLib.GZip.GZipInputStream(t))
tags=x.GetElementsByTagName("dict")
if tags.Count==0:
return
url=""
albumname=album
for tag in tags[0].ChildNodes:
if tag.InnerText=="cover-art-url":
url=tag.NextSibling.InnerText
if tag.InnerText=="playlistName":
albumname=tag.NextSibling.InnerText
if url.Length>0:
url = System.Text.RegularExpressions.Regex("\\.enc\\.jpg\\?.*").Replace(url, ".jpg")
coverart.SetCountEstimate(1)
coverart.AddThumb(url,albumname,-1,-1,null)
static def GetResult(param):
return null