Created
July 26, 2019 23:02
-
-
Save nna774/5535121741b3e57a6171cd961a47caf5 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/bash -xe | |
BUCKET='gs://nana-youtube' | |
TEMPDIR=$(mktemp -d) | |
DATE=$(date +%s) | |
./youtube-dl -v -o "${TEMPDIR}/${DATE}-%(title)s-%(id)s.%(ext)s" "$1" | |
./youtube-dl -J "$1" | tee "${TEMPDIR}/${DATE}.json" | |
gsutil cp "${TEMPDIR}/*" ${BUCKET} | |
rm -fr ${TEMPDIR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment