Skip to content

Instantly share code, notes, and snippets.

@nna774
Created Jul 26, 2019
Embed
What would you like to do?
#! /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