Created
October 2, 2016 16:48
-
-
Save SenpaiSilver/1c7f411e67a32a64d63aec4df4c10791 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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