iPlayer cat and mouse

My iPlayer download script had been failing on a number of programmes recently, and I’d assumed that they were just not encoded as MPEG 4 files. Having seen them work on a real iPhone, though, I now know that it’s not the case.

It didn’t take me long to find the problem: there can now be multiple pid values in the file, and my naïve regular expression was selecting the first one, which was the wrong one. Selecting the last one seems to work in all the cases I’ve tried, so I’ve made that change. I don’t think that this was a deliberate attempt to lock scripts out, but it had that effect.

If it wasn’t working for you, try downloading the script again, and let me know how it goes.

iplayer-dl

Incidentally, I know that the Beebhack wiki is sometimes returning a spammy parking page. I’m not sure what’s going on.

Comments

Skip to the comment form

  1. Irregular Shed

    Wrote at 2008-04-10 14:24 UTC using Firefox 2.0.0.13 on Windows XP:

    Spammy parking page? That’s strange. I’ve been referring to it a lot over the past week or so, whenever I’ve had time to hack away at my own scripts, and haven’t had any problems.
  2. Neil

    Wrote at 2008-04-10 16:14 UTC using Safari 525.13 on Mac OS X:

    Thanks Paul! This script is superb and works brilliantly on my Mac, the downloaded files are free to be played on both my Xbox 360 and my iPod.
    Ideal!
  3. Jonathan Duncan

    Wrote at 2008-04-16 23:49 UTC using Firefox 2.0.0.13 on Windows Server 2003:

    I hope you don’t mind but i’ve reimplemented your ruby script in lua (simply because i already have a need for lua and not for ruby so i’d rather have one interpreter installed than two).
    You can find it here http://pastey.net/85893

    It requires luasocket and lua ofc course and i’ve added the ability to re-start downloads which failed half way though (due to my crap wifi connection!)
  4. Paul Battley

    Wrote at 2008-04-17 00:32 UTC using Firefox 3.0b5 on Linux:

    That’s fine. The more the merrier!

    I’ve discovered that the strategy of just picking the last PID wasn’t working quite as I’d hoped: in some cases, this was giving the sign language version, which I find distracting.

    I’ve written a poor man’s parser to look at the JavaScript that defines the availability. The script now works out which versions are available and downloads the non-signed version by preference.

    I’ve also added resume functionality, and now take the title and subtitle from the XML metadata.
  5. Chris

    Wrote at 2008-05-13 21:49 UTC using Mozilla 1.8.1.12 on Linux:

    Thank you so much for iplayer-dl. Last time I seriously used it was middle of March, so I was not surprised to see there’s been a bit of cat’n’mouse going on since I was last here. Keep up the good work, thank you!

    Here’s a link (BBC Young Musician of the Year 2008 – Final) that doesn’t play:

    http://www.bbc.co.uk/iplayer/page/item/b00bf2w2.shtml?order=aztitle%3Aalphabetical&filter=category%3A100006&scope=iplayercategories&start=1&version_pid=b00bf2v5

    Your script reckons there’s no MP4 version. Me? I can’t tell as I don’t have an iPhone.

    Regards,
    Chris
  6. simon

    Wrote at 2008-06-10 13:31 UTC using Firefox 2.0.0.14 on Mac OS X:

    starting as of June 9th, 2008 – none of the available nature documentaries produce a workable movie file when downloaded using iplayer-dl-0.1.3.
    Looks like the beeb have introduced another change…. :(

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.