Cracking open the iPlayer

In what seems to be a burst of the kind over-enthusiasm that the iPhone inspires, someone at the BBC has set up a special version of the iPlayer for that shiny toy. It recognises the iPhone’s user agent and serves up standard MP4 files.

No Flash. No streaming. No DRM. Excellent.

Here’s a little tool that uses cURL and a little Ruby glue to pretend to be an iPhone and download those MP4 files for offline viewing at your leisure. Just give it the URL of an iPlayer viewing page and it will do the rest.

iplayer-dl

Comments

Skip to the comment form

  1. Patrick Moore

    Wrote at 2008-03-09 00:46 UTC using Internet Explorer 7.0 on Windows XP:

    Thanks Paul – very nice.
    It took me a few minutes before I realised that I needed to apt-get curl for it to work.
  2. Steve Jobs

    Wrote at 2008-03-09 02:31 UTC using iPhone on Mac OS X:

    Hi,

    Any idea why some pages have a PID but return an HTML doc which says “Sorry an error has occurred” ?

    E.g.
    http://www.bbc.co.uk/iplayer/page/item/b00936pn.shtml

    Thanks,
    SJ

    PS – You do have a very nice ass….

    http://po-ru.com/photos/galway/P1000522.jpg
  3. Alex MacCaw

    Wrote at 2008-03-09 10:01 UTC using Firefox 2.0.0.12 on Mac OS X:

    Brilliant! Bet they didn’t see that coming.
  4. Paul Battley

    Wrote at 2008-03-09 10:17 UTC using Firefox 2.0.0.12 on Linux:

    Steve (not your real name, I suspect!), I think that’s because they haven’t transcoded all the content to MP4.
  5. kota

    Wrote at 2008-03-09 14:28 UTC using Firefox 2.0.0.11 on Linux:

    Works, although as SJ has pointed out, some videos are not available.
    Thanks for sharing this!
    kota.
  6. Matt

    Wrote at 2008-03-10 16:18 UTC using Safari 419.3 on Mac OS X:

    I was just going to write something like this myself. Nice work, Paul!
  7. Kristian

    Wrote at 2008-03-10 22:46 UTC using Firefox 2.0.0.6 on Linux:

    Nice one Paul, this is freakin sweet, as I was reading your post I was thinking about writing this myself but your script works nice, don’t have to force myself to read the Metro in the morning anymore : ]
  8. Luke Redpath

    Wrote at 2008-03-13 14:21 UTC using Safari 523.15 on Mac OS X:

    According to the BBC website, they’ve fixed this ‘exploit”:

    http://news.bbc.co.uk/1/hi/technology/7293988.stm
  9. Paul Battley

    Wrote at 2008-03-13 14:24 UTC using iPhone on Mac OS X:

    Don’t worry, Luke, we’re on it!
  10. Paul Battley

    Wrote at 2008-03-13 15:14 UTC using iPhone on Mac OS X:

    I’ve found out how they’ve implemented the blocking, and found a way round it.

    I’ll fix the script tonight. Stay tuned!
  11. Paul Battley

    Wrote at 2008-03-13 21:21 UTC using Firefox 2.0.0.12 on Linux:

    All done: http://po-ru.com/diary/bbc-iplayer-fix-hacked-again/

    The link now goes to the updated script.
  12. Droidyman

    Wrote at 2008-03-16 18:39 UTC using Firefox 2.0.0.12 on Mac OS X:

    Sorry to be a thickie, how does this work? I’ve tried running it as a command line – nothing.
    I’ve finally got a stable way of extracting files from my Tivo, this would be an excellent addition to get programmes I’ve missed.

    thanks
    A
  13. Steve

    Wrote at 2012-03-16 14:29 UTC using Firefox 10.0.2 on Windows XP:

    Does this program still work?

Leave a comment

Please read the comment guidelines before posting. Comments are Gravatar-enabled. Your email address will not be published.

To prove that you’re human, type human in the Bot check field.

Trying to post some program output or a long code sample? Please use a paste service and link to it instead.