#!/bin/sh -e # Grab a video (in nasty Flash video format) from youtube.com. # This used to do everything itself -- but since youtube-dl now does a better # job, I can just call that with some sensible arguments... dl="youtube-dl -o %(title)s.%(ext)s" for url in "$@"; do # Try the high-def version first. $dl -d "$url" || $dl "$url" done