Last active
September 29, 2018 14:33
-
-
Save hub23/d2224c2b4176dfb1a5bf28a6257f8a53 to your computer and use it in GitHub Desktop.
youtube-dl wrapper for mp3 downloads
This file contains hidden or 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/bash | |
ydlBaseString='youtube-dl --no-call-home --min-sleep-interval 0.5 --max-sleep-interval 2 --prefer-ffmpeg --extract-audio --ignore-errors --audio-format mp3 -o "%(title)s.%(ext)s"' | |
ydlURL="$ydlBaseString $1" | |
ydlList="$ydlBaseString --batch-file=$1" | |
if [[ $1 =~ ^http.* ]] ;then | |
eval $ydlURL | |
elif [[ $1 ]] ;then | |
eval $ydlList | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment