How to convert a iTunes-only podcast link into a usable RSS podcast

From WhyNotWiki
Jump to: navigation, search

Problem: Links to podcasts on iTunes require iTunes

[Apple (category)] [Reasons I hate Apple (category)]

When you follow a link to a podcast, sometimes it takes you to a page that says -- if you don't have iTunes --:

One Moment Please. Connecting to the iTunes Store. Loading [I have iTunes] [Download iTunes] We are unable to find iTunes on your computer. If iTunes doesn't open, click the iTunes application icon in your Dock or Windows Task Bar.

What if I don't have iTunes? There's no [I don't have iTunes and don't want iTunes but I do want to access the podcast anyway] button!

Why should I be required to have iTunes in order to access the podcast? That doesn't make any sense. There is no technical reason why I should be required to have iTunes in order to access the podcast. A podcast is simply an RSS file, for crying out loud.

Googling for ""We are unable to find iTunes on your computer" "without iTunes"" and ""We are unable to find iTunes on your computer" linux" got me a couple useful hits...

http://www.linuxquestions.org/questions/linux-software-2/what-programs-would-you-like-to-see-ported-to-linux-105955/page207.html. Retrieved on 2007-05-11 11:18.

Have you actually tried it? I get the following message: "We are unable to find iTunes on your computer."

That's Apples evil lock ins in action.

(I'm not the only one to have seen and hated that message.)

http://psi.cc/l/listen-to-podcast-without-itunes/. Retrieved on 2007-05-11 11:18.

If you clicked the above link to the podcast and you don’t have iTunes installed, you’ll be prompted to install it before continuing. As a fan of Winamp on Windows and XMMS on Linux, I simply do not have room for iTunes in my life. The last time I installed iTunes—this was a while ago—I recall the installer program completely destroying the directory structure of my music archive and renaming every file to conform to the iTunes catalog. Never again. The good news is that you can usually get at the audio content without iTunes installed. When you get to the page that says “We are unable to find iTunes on your computer” view the source and check out the onload attribute of the body tag: ... The first parameter of the call to itmsOpen holds an itms:// URL. Now, if you had iTunes installed, this link would naturally open up with iTunes, but we do not. Fortunately, the itms:// scheme is actually just XML over HTTP, so we can replace itms:// with http://. http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewPodcast?id=269238657 View the XML document in your browser, or download it, and search for instances of the string episodeURL. After each instance, you’ll find a string element containing a URL of the episode: <string>http://www.combobreaker.com/episodes/cb_ep_001.mp3</string> And there you have it.

I did that and found this podcast URL: http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewPodcast?id=277631551&ign-mscache=1

That would be great and all if I just wanted to download the files, but I actually would rather actually subscribe to the podcast in Amarok so that I get all the nice metadata too. But I can't simply do that because the "podcast" file on the Apple server is not a plain old RSS podcast file. It's some weird format with iTunes-specific data -- specifially, UI information -- in addition to the actual podcast data.

If you look down far enough into the file, though, there is indeed podcast data (URLs to episode .m4v files plus episode metadata):



  <TrackList>
    <plist version="1.0">
      <dict>
        
        <key>listType</key><string>podcast</string>
        <key>priceFormat</key><string>$%0.2f</string>
        
        <key>items</key>

          <array>
            
                <dict>
  
  <key>artistName</key><string>Marcus Buckingham and Oprah Winfrey</string>
  <key>buyParams</key><string>productType=podcast</string>
  <key>category</key><string>Training</string>
  <key>description</key><string>Meet your instructor and classmates for Marcus Buckingham's career intervention workshop.</string>

  <key>duration</key><integer>1213000</integer>
  <key>episodeGUID</key><string>http://flv.oprah.com/podcast/mbuckingham/i/mbuck-vidPodLow-session1.m4v</string>
  <key>episodeURL</key><string>http://flv.oprah.com/podcast/mbuckingham/i/mbuck-vidPodLow-session1.m4v</string>
  <key>explicit</key><integer>0</integer>
  <key>feedURL</key><string>http://www.oprah.com/podcasts/mbuckingham.xml</string>

  <key>genre</key><string>Training</string>
  <key>genreId</key><integer>1470</integer>
  <key>isEpisode</key><true/>
  <key>itemId</key><integer>24204373</integer>
  <key>itemName</key><string>Session 1: An Introduction (iPod)</string>

  <key>keywords</key><string>marcus buckingham markus buckingham career workshop career intervention strengths weaknesses oprah's class work job satisfaction new career oprah winfrey orpah</string>
  <key>kind</key><string>movie</string>
  <key>longDescription</key><string>Meet your teacher, Marcus Buckingham. Get to know 29 participants from Marcus's original workshop and see how their struggles reflect yours. Then, start your own journey with three simple questions.</string>
  <key>playlistId</key><integer>277631551</integer>

  <key>playlistName</key><string>Take Control of Your Career and Your Life with Marcus Buckingham</string>
  <key>podcast-id</key><integer>277631551</integer>
  <key>podcastId</key><integer>277631551</integer>
  <key>podcastName</key><string>Take Control of Your Career and Your Life with Marcus Buckingham</string>
  <key>popularity</key><string>0.0</string>

  <key>priceDisplay</key><string>Free</string>
  <key>rank</key><integer>1</integer>
  <key>releaseDate</key><string>2008-04-04T10:00:00Z</string>
  <key>s</key><integer>143441</integer>
  <key>url</key><string>http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewPodcast?i=24204373&id=277631551</string>

</dict>
...
 


The problem is that it's in this weird plist format, and not in the usual RSS format. Also, it appears to be a binary format if accessed via curl/wget.

Contents

How do I get a non-binary version of the file using a command-line utility like wget?

When I access that in my web browser, it loads it as a human-readable XML file. But when I did this:

> wget -O podcast.plist 'http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewPodcast?id=277631551&ign-mscache=1'

The resulting file was binary, not readable by humans.

Okay, it looks like it's just zipped...

> file podcast.plist
podcast.plist: gzip compressed data, from FAT filesystem (MS-DOS, OS/2, NT)
> wget -O podcast.plist.gz 'http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewPodcast?id=277631551&ign-mscache=1'

> gzip -d podcast.plist.gz 

I now have a human readable podcast.plist file!

I removed the junk at the beginning, leaving only the TrackList tag and its contents.

How do I get wget to unzip it for me?

...

How do I convert from plist format into a normal RSS?

Googled for "convert apple plist to rss" and "convert podcast plist to rss".

That mostly tells you to use a utility called plutil, which is only for Mac.

Finding plutil for Linux

Can't find such.

Found http://www.scw.us/iPhone/plutil/plutil.pl but that wasn't an actual port and didn't do anything useful with my .plist file.

> perl ./plutil.pl podcast.plist 
plutil.pl v1.5

Old: podcast.plist, from: text, to: binary
Found .plist
TryName: podcast.binary.plist
TryName: podcast.binary.plist
XMLToBinary:
Unknown plist version          at ./plutil.pl line 555, <INF> line 3.
Undefined subroutine &main::ReadXkey called at (eval 5) line 1, <INF> line 4.
 in ReadXObject at ./plutil.pl line 253, <INF> line 4.

}

http://george.zjlotto.com/index.php/2007/12/05/plutil-a-nifty-tool-to-edit-plist-files/. Retrieved on 2007-05-11 11:18.

To convert a .plist file to XML format so that it can be edited on Windows, use the following command:

# plutil -c xml1 ~/Library/Preferences/.GlobalPreferences.plist
Converting .GlobalPreferences.plist to XML

I'm not sure if that would be helpful because I don't have plutil to try it...

[To do: I guess I'll just have to write my own...]

In the meantime, I'll just download all the files. I can associate them with a podcast/metadata at a later time.

> grep episodeURL podcast.plist | sed 's|.*\(http:.*\)</string>|\1|' | xargs -n1 wget


Example

On http://www2.oprah.com/money/career/marcus/course/marcus_course_main.jhtml, I found a link to a podcast I wanted to subscribe to.

To watch this workshop on your iPod, simply subscribe to the podcast in iTunes and download each session automatically.

When I clicked on the link, I was redirected to [1] and got the useless message described above.

Ads
Personal tools