A Very Quick "one-liner" download script Edit
The following script is technically one line of shell script. It requires curl, cut, grep and sed:
curl -b cookies.txt -A "Apple iPhone v1.1.3 CoreMedia v188.8.131.52A93" -H "Range: bytes=0-" -o iplayer_download.mov \ $( \ curl -i -c cookies.txt -A "Apple iPhone v1.1.3 CoreMedia v184.108.40.206A93" -H "Range: bytes=0-1" \ $( \ curl -i -A "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3" -c cookies.txt $1 \ | grep "pid :" \ | cut -d\' -f2 \ | sed "s/\([0-9a-z]\)/http:\/\/www.bbc.co.uk\/mediaselector\/3\/auth\/iplayer_streaming_http_mp4\/\1/" \ ) \ | grep Location \ | cut -d: -f2,3 \ )
If it's saved off to a script file, pass it an web iPlayer episode page and it will save the episode to a file named "iplayer_download.mov".
Note: This will only download video files that have been encrypted using an XOR. Some of the Programs may be able to decode these files but newer scripts are now able to download unencrypted working video instead, so these should be used. This is only here as an example or for use if someone wanted to look at the encrypted files for whatever reason.