Created
June 21, 2017 01:53
-
-
Save thanthese/14eb3d436e97409bfdb6ed4268ca3f16 to your computer and use it in GitHub Desktop.
Downloads the audio of a youtube video and converts to an .mp3 given a youtube URL.
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
#!/usr/bin/env bash | |
# Downloads the audio of a youtube video and converts to an .mp3 given a | |
# youtube URL. | |
if [ $# -eq 0 ]; then | |
echo "No arguments provided. Give full youtube URL." | |
exit 1 | |
fi | |
youtube-dl --extract-audio --audio-format mp3 $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment