Downloading Rails Casts
Rails casts is hosting Ruby on Rails video tutorials. It explains a lot of tips for development and how different rails components work. I highly recommend it for rails starters.
I wanted to download all the previous episodes, that needed me to open the page of each episode, find the link for the mov file, and click save as. So i created a bash script to visit the links of the episodes and do the job automatically
for ((i=$1;i<=$2;i+=1)); do
wget http://railscasts.com/episodes/$i -O- | grep -oi 'http://media.railscasts.com/videos/[a-z_0-9]*.mov' >> links
while read LINE ; do wget "$LINE" ; done < links
Now the script can be used to download any range of episodes. below i'm calling it to download episodes from the episode #1 to episode #115
./get_rails_casts.sh 1 115