0xDECAFBAD

ItunesMusicStoreToRss

Revision r1.4 - 16 Mar 2004 - 16:12 GMT - TWikiGuest

Abstract

So, while I like that Apple has this New Music Tuesdays thing going on, and I get an email tossed my way on a weekly basis, I'd really much rather have new releases spool into my aggregator system. Well, as I discovered, Tim Bray observed, and about which Tristan Louis emailed me, the iTunes Music Store is an XML-driven application with a fairly simple URL-based API.

If you spy on iTunes while browsing to a "Just Added" section of a genre, you'll find that a URL like the following is accessed:

http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145690&pageType=justAdded&id=21

The response to that URL is some very interesting XML that looks like a GUI language. Buried in the GUI recipe, however, is what I want flowing into my aggregator. So, I dust off my XSL skills and have a go at mangling this content into RSS. I seem to have been successful. A test run appears to validate, and is accepted in my aggregator.

The problem, though, lies in the aforementioned URL. Everything seems pretty clear and straightforward, and I can change genre's by supplying discovered ID's to the id parameter. However, the "fcid=145690" parameter is an unknown to me. It seems to change, though I haven't yet investigated its derivation or how often it changes. I was working on things yesterday, and the value was one thing, this morning it was another. If the number is not valid, unexpected results happen, sometimes resulting in HTML output describing an application exception. So, until the fcid mystery is solved, I've yet to automate this transformation.

Any ideas out there on the lazyweb? Feel free to poke fun at my XSL skills.

category id?

The fcid seems to be related to the category id. For example I just got: /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145040&pageType=justAdded&id=7 /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145190&pageType=justAdded&id=11 /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145590&pageType=justAdded&id=19 /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145640&pageType=justAdded&id=20 /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145690&pageType=justAdded&id=21 /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145866&pageType=justAdded&id=24 /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145890&pageType=justAdded&id=25 /WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewPlayListsPage?fcId=145740&pageType=justAdded&id=26

Seems that it should start at 144740 and go up in 50s. However, as with id=24, id=1 is 144766. I think some id numbers might not have genres, so return errors.

Also, Safari says invalid URL, but Camino gets the XML.

-- TWikiGuest - 21 May 2003

RE: fcid

Maybe you want to use the 'Alternative' url from the top of the xml output...

http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.app.store.DirectAction/viewGenre?id=20

This seems to give a much longer list including Top Downloads etc. and buried in there is the url for your 'Just Added' section, maybe the url here will be updated with the correct fcid?

-- TWikiGuest - 08 May 2003

Download

Latest Release:

When I grow up, I want to be a computer scientist
Rotating header picture Rotating header picture


Advanced Search

Related Entries

(Disabled, for now.)

Buttons

View items on my Amazon wishlist

Made on a Macintosh Powered by Movable Type <$MTVersion$> Made for Safari Get Firefox You can do better than Microsoft Internet Explorer

Creative Commons License
This work is licensed under a Creative Commons License.