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.


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