Skip to content

Instantly share code, notes, and snippets.

@go-ive
Created September 1, 2016 19:42
Show Gist options
  • Save go-ive/5f7024b3b1f438938a926a263e2c9961 to your computer and use it in GitHub Desktop.
Save go-ive/5f7024b3b1f438938a926a263e2c9961 to your computer and use it in GitHub Desktop.
Download YouTube videos using a list of URLs
#!/bin/bash
# Usage: ./youtube-dl.sh <path/to/file/of/youtube/links>
readonly TMP_DIR="/tmp/ytdl"
readonly ARGS="$@"
main() {
while read url
do
youtube-dl $url --output ${TMP_DIR}/%\(title\)s
done < ${ARGS[0]}
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment