Skip to content

Instantly share code, notes, and snippets.

@SenpaiSilver
Created October 2, 2016 16:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SenpaiSilver/1c7f411e67a32a64d63aec4df4c10791 to your computer and use it in GitHub Desktop.
Save SenpaiSilver/1c7f411e67a32a64d63aec4df4c10791 to your computer and use it in GitHub Desktop.
#!/bin/sh
function retrieve_video() {
QUALITY=$(youtube-dl -F ${1} | grep best | cut -d ' ' -f 1)
echo Quality: ${QUALITY}
youtube-dl -f ${QUALITY} "${1}"
}
current=0
if [[ $# = 0 ]]; then
echo No video specified 1>&2
fi
for i in $@; do
((current++))
echo "Doing (${current} of $#) ${i}"
retrieve_video ${i}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment