Monday, July 09, 2007

The IT Crowd for download

The last week I started to see a tv serie called "The IT Crowd" on Sony, it's a funny geek serie about an IT team in a british company. Anyways, a friend of mine (Manu) wanted to download all the chapters from a site, so I wrote this simple script for him:

#!/usr/bin/env bash

for x in $(egrep -i "The-IT-Crowd---1x0*" index.html | awk -F '/' '{ print $4}' | sort -m -u); do
tput setaf 1
echo "Downloading chapter ${i} (Link:${x}.divx)"
tput sgr0
wget${x}.divx --output-file="${i}.avi"

I hope someone find it useful.

EDIT: Unfortunately, this doesn't work anymore, since stage6 was closed.

No comments: