iTunes Podcast URLs….

I was stumped the other day trying to download a podcast from a site that published the podcast through the itunes portal. The reason I was stumped is because you can only download an itunes podcast from a computer that is running macos or windows with apples itunes software installed. I run Linux on my current computer which is a PII 350Mhz would you believe it!!!! Runs everything fine including all the woo-woo techie stuff!!! That’s one for sustainability and one for Linux!!!! anyway…..

I found this little python script from Andrew Clark the other day….

itunes-url-decoder.py

The following are the comments at the start of the python script….

———— begin cut ————

#  itunes-url-decoder.py
#
#  A quick and dirty Python hack to retrieve the RSS feed URL from an
#  iTunes Music Store (ITMS) podcast URL.
#
#  Written in August 2007 by Andrew Clarke <mail@ozzmosis.com>
#  and released to the public domain.

———— end cut ————

It takes an itunes podcast url as an argument and returns the actual xml web address of the podcast itself. This means that you copy the xml address to any rss reader or podcast enabled music player to get the podcast. That’s another one up for Linux and free software and information.

7 Responses to “iTunes Podcast URLs….”

  1. Stefan Says:

    Exactly what I was looking for. Thanks!

  2. chris Says:

    Hey Stefan… no worries!!! You are the first legitimate comment on my web site… Yipeee That makes me feel so good because I always thought that something on this web site would be useful to someone but then nobody left a comment…. Oh well… I must just be a geek after all….

  3. Josh Says:

    Sorry to ask, but I am really new to Linux. How would you run this script? I suppose you run it from the Terminal, but what’s the command?

    Any help would be greatly appreciated!

    Thanks,

    Josh

  4. Ian Says:

    Great workaround, though i’m not sure how to actually use it. if anyone could tell me, that would be awesome :D

  5. Greg Says:

    G’day mate, I’m having trouble using that script. I’m running ubuntu and am quite new to it.

    I’ve tried

    $ python itunes-url-decoder.py http://deimos3.apple.com/WebObjects/Core.woa/Browse/queensu.ca.1330418963

    which gives me the error

    itunes-url-decoder.py error: itmsOpen() not found in http://deimos3.apple.com/WebObjects/Core.woa/Browse/queensu.ca.1330418963

    and

    ~$ python itunes-url-decoder.py itms://deimos3.apple.com/WebObjects/Core.woa/Browse/queensu.ca.1330418963?ignore.mscache=1708757

    which gives me the error

    Traceback (most recent call last):
    File “itunes-url-decoder.py”, line 65, in
    xml_url = get_xml_url(http_get(arg))
    File “itunes-url-decoder.py”, line 29, in http_get
    usock = urllib2.urlopen(request)
    File “/usr/lib/python2.5/urllib2.py”, line 124, in urlopen
    return _opener.open(url, data)
    File “/usr/lib/python2.5/urllib2.py”, line 381, in open
    response = self._open(req, data)
    File “/usr/lib/python2.5/urllib2.py”, line 404, in _open
    ‘unknown_open’, req)
    File “/usr/lib/python2.5/urllib2.py”, line 360, in _call_chain
    result = func(*args)
    File “/usr/lib/python2.5/urllib2.py”, line 1140, in unknown_open
    raise URLError(’unknown url type: %s’ % type)
    urllib2.URLError:

    Do you know what I’m doing wrong?

  6. chris Says:

    <p>Well…. What you have to do is actually download the .py script, save it as a .py file, make it executable (chmod +x), and then issue the following command while your are in the directory that the script resides:</p>
    <p>python itunes-url-decoder.py url_of_site</p>
    <p>This assumes that you save the file with the name ‘itunes-url-decoder.py’…. replace url_of_site with the actual url. </p>
    <p>If that doesn’t work then we’ll have to search larger afield because I don’t have the time/mindspace/ability at present to sort out python problems or other peoples computer setups etc etc. Sorry …. Anyone else have a solution to this dilemma?</p>

  7. Chris Macp Says:

    Excellent my friend! Just being getting annoyed with a great website that now only publishes the Itunes podcast link instead of the feed itself. Great, lock us into even more apple stuff! Cant even run Itunes on my Ubuntu set up.

    Anyway, all sorted now, it worked a treat. Thanks for your great little program.

Leave a Reply