Boo & DotNetRocks
Fact: DotNetRocks makes you a better programmer.
Boo makes you a great programmer.
What happens when you combine them together? The entire dot net rocks archive!
I keep going to the Dot Net Rocks site for more stuff, but because I listen faster than they record (except during the road trip {Hi, when is the next one due :-)}), I've started to dig into their archives. But they are lots of shows, and there doesn't seem to be any torrent for all of the files. After downloading a single show for the tenth time, I decide to put some code into action, instead of clicking on links like an idiot.
Here is the result:
- import System.IO
- import System.Net
- import System.Text.RegularExpressions
- link_url = """http://perseus\.franklins\.net/[\d\w]+\.mp3"""
- for i in range(1,157):
- base_url = "http://www.dotnetrocks.com/default.aspx?showID=${i}"
- print "echo Trying to connect to: ${base_url}"
- using response=WebRequest.Create(base_url).GetResponse():
- match = Regex(link_url).Match(StreamReader(response.GetResponseStream()).ReadToEnd());
- print "wget ${match.Value}"
I really like the way that Boo just stepped out of the way nicely to let me do it.
Comments
Comment preview