Downloads youtube videos using youtube-dl. I built it to download multiple videos in a row. Put each url in a pair of single quotes.

#!/bin/bash SETDIR="/downloads/watch/misc" DIRFLAG=0 for ARG in $* do ARG="$(echo "$ARG" | sed 's/feature=[a-z_+]*&//')" # http://www.youtube.com/watch?feature=player_embedded&v=qeK0KmtYNaA # http://www.youtube.com/watch?v=kV832rfjcas&feature=related echo "$ARG" if [ x$ARG = x ] then exit elif [ x$ARG = "x-d" ] then DIRFLAG=1 elif [ $DIRFLAG = 1 ] then DIRFLAG=0 SETDIR=$ARG else echo "$SETDIR $ARG" youtube-dl -w -o "$SETDIR/%(title)s.%(ext)s" --max-quality=22 "$ARG" fi done