See http://steve-parker.org/code/sh/bbc/ See also http://steve-parker.org/urandom/?y=2007&m=01#bbc ############ Okay, here's a sample run. ############ I heard that there was a documentary about ############ The Pixies on BBC Radio 1. Let's find it: ############ "-1" specifies "Radio 1". You can edit the file and set "RADIO=radio1" to make ############ it the default. ############ "grep pixies" searches for the word "pixies". $ ./bbc.sh -1 list|grep pixies pixies_doc : Time For Heroes: The Pixies ############ So let's download it.... Again "-1" for "Radio 1", and we've got the name ############ of the file, now: "pixies_doc". $ ./bbc.sh -1 pixies_doc Programme: pixies_doc on radio1 Getting schedule ... pixies_doc : Time For Heroes: The Pixies - QOTSA's Josh Homme charts the return The Pixies. ############ Confirmation of the programme, good. Yes, that's what I wanted. ############ Now get ready for a long wait. This programme is 30 minutes, ############ so it will take 30 minutes to download. ------------------------------------------------------------------------------ | | | Wed Jan 24 23:08:15 GMT 2007 : Download starting. | Please wait, this will take as long as the show itself. | | | ------------------------------------------------------------------------------ real 31m42.928s ########### See that? "real 31m"? That's a real time of 31 minutes to download. ########### The BBC server thinks that you've been listening, so it's played it ########### at real time speeds. user 0m0.260s sys 0m0.900s -rw-r--r-- 1 foo foo 11M 2007-01-24 23:39 pixies_doc.dump ------------------------------------------------------------------------------ | | | Wed Jan 24 23:39:58 GMT 2007 : Download complete. | | ------------------------------------------------------------------------------ ########### But it's not over yet... that pixies_doc.dump file is okay if ########### you've got RealPlayer, but it won't work on an MP3 Player. Converting audio dump to WAV... -rw-r--r-- 1 foo foo 320M 2007-01-24 23:40 pixies_doc.wav ########### Wow, that 11Mb .dump file became a 320Mb WAV file ########### Aaargh, this can't be good? Well, WAV isn't the format you want. ########### We want an MP3 file. Got lame installed? Good.... Converting WAV to MP3... -rw-r--r-- 1 foo foo 13M 2007-01-24 23:41 pixies_doc.mp3 $ ########### And that's it. We've got a file called pixies_doc.mp3 which ########### we can keep forever (or 30 days, I think the law says). ########### Of course, if don't have BBC License, then don't even think ########### about it in the first place. This is for UK resident BBC License payers.