Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

View the iTunes Music Store's source code Internet
I was browsing the iTunes Music Store the other day, and I was thinking; the iTunes Music Store must be a system of XML feeds stored in some far off web server–Apple just forces you to view the XML in iTunes. That thinking got me thinking some more. There must be a way to browse the iTMS in a web browser. So, I started off by opening iTunes and getting a URL. I took the following Saturday Night Live link:
(Broken into two lines for a narrower display here.) Well and good. Type that into your web browser, and you've got iTunes opening the SNL page. So, I tried to circumvent this automagic opening of iTunes; I popped open the OS X Terminal application and typed the following:
curl "\
curl is just a way of downloading the source code of a specified page, for those of you who don't know. It worked, and returned the source code for the page. I skimmed the JavaScript functions in the source, and went to the bottom section of the code. When the body loads, a URL is opened in iTunes. I copied and pasted the first link I found there into Safari. As expected, it opened in iTunes, obviously, as the protocol is itms://; why not just change it to http://?

I did, and the resulting link will will load in your web browser. It just loads the main content of the page, no formatting, but all the source code is there. Browsing it, you'll see all of the XML tags which iTunes takes and makes a beautiful page with. It's not very useful, but it's fun nonetheless!

In summation, to turn a standard iTMS link into a web-browser-ready page, just change the server to, and change the itms:// into http://.

[robg adds: Opening the page in Firefox is much more interesting than in Safari; Safari attempts to interpret the XML, whereas Firefox will just display it in its raw XML format. And yes, this is mainly a hint for the ultra-curious who just like to dig into everything :).]
  • Currently 1.17 / 5
  You rated: 1 / 5 (6 votes cast)

View the iTunes Music Store's source code | 6 comments | Create New Account
Click here to return to the 'View the iTunes Music Store's source code' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View the iTunes Music Store's source code
Authored by: verdon on Jan 13, '06 07:09:12AM

If you view source in safari, you'll see pretty much what firefox is displaying, sans colour ;)

[ Reply to This | # ]
View the iTunes Music Store's source code
Authored by: siliconman on Jan 13, '06 07:38:52AM

Now someone needs to create a dashboard widget that pulls the data from the iTunes Music Store for the track that is currently selected/playing so that we can import the artwork, Genre, Year, etc into our music files.

[ Reply to This | # ]
View the iTunes Music Store's source code
Authored by: jelockwood on Jan 13, '06 08:20:44AM

The scripts at pretty much do this already.

[ Reply to This | # ]
View the iTunes Music Store's source code
Authored by: ssevennm on Jan 13, '06 08:20:37AM
You can display the XML in PHP too. See how here.

[ Reply to This | # ]
View the iTunes Music Store's source code
Authored by: wrycooter on Jan 13, '06 04:29:14PM

What I would like to do is the inverse of this; I want to use iTunes, or something as flexible as iTunes, to view any old XML. (an old iTunes exported library would be a start.

I have searched for any xml parser out there that is as elegant as iTunes, and even asked people that provide a load of XML content on their site what they recommend, and they merely say "There's Tons of them, take a look". Umm, is that begging the question?

What I want is something that will view any xml file in column form, allow the columns to collapse or sort, and allow that spotlight style searching of the contents. Without having to dealing directly with PHP and the terminal.

[ Reply to This | # ]
View the iTunes Music Store's source code
Authored by: Jason_ff on Jan 15, '06 02:45:46PM

A few years ago (actually, it was a week before the iTMS 1st birthday), I figured out how to read those pages in a browser, and I also figured out how to WRITE them!!

So I started playing around, writing my own pages. throw a itms:// in front of it, and it would render the page in iTunes. I could link to other pages, and even play music. Then iTunes 4.5 came out, and suddenly it wouldnt open my pages anymore.

I was very sad...

[ Reply to This | # ]