Last active
October 29, 2016 11:20
-
-
Save ljcooke/ebc8c950382d442e0c6b14ba53bad931 to your computer and use it in GitHub Desktop.
Download a video from Vine.
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
Download a video from Vine. | |
Requires a recent version of youtube-dl: https://rg3.github.io/youtube-dl/ | |
Usage example: | |
./dl-vine.sh https://vine.co/v/ig3PwDLpmEL |
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
#!/usr/bin/env bash | |
if [ -z "${1:-}" -o "$1" = "-h" -o "$1" = "--help" ]; then | |
echo "Usage: $0 URL" | |
exit 1 | |
fi | |
set -o errexit | |
url=$1 | |
youtube-dl \ | |
-o "%(uploader)s/%(upload_date)s %(id)s.%(ext)s" \ | |
--add-metadata \ | |
"$url" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment