But that's not why I want to blog about it because there are already scripts to download YouTube videos. The reason I'm blogging is because it is a one-liner.
wget "http://www.youtube.com/get_video?`wget -q -O - "http://youtube.com/watch?v=$1" | egrep -m1 -o 'video_id=[^&]+&l=[0-9]+&t=[^"&]+'`" -O $1.flv
Note: $1 is the video_id parameter sent to the script.
Download the script.