Latest iPlayer changes revisited
I updated my downloader the other day to keep up with the latest round of changes to the iPlayer service. However, I missed some complications regarding age-restricted programmes, and it wasn’t possible to download those at all.
I’ve fixed the problem, so go and update if you haven’t already.
Here’s how downloading currently works:
- GET the iPhone programme page (http://www.bbc.co.uk/mobile/iplayer/episode/PID) using the iPhone user agent.
- If there’s an age restriction form, make a POST to the same
address, sending the form parameters (e.g.
form=guidanceprompt&isOver16=1
) - Extract the streaming URL from the embed element.
- GET the stream using the CoreMedia user agent and an appropriate Range header.
Cookies need to be captured and sent throughout the process, including in the final download step.