#!/bin/sh
wget $(curl -D /dev/fd/3 "http://www.youtube.com/get_video?`curl "$1" | grep SWFObject | sed -e 's/.*?\([^"]*\)".*/\1/' -e 's/&l=[^&]*//'`" 3>&1 | sed -n 's/^Location: //p')

