Skip to content

Instantly share code, notes, and snippets.

@david-murr
Created December 2, 2016 16:46
Show Gist options
  • Select an option

  • Save david-murr/fb5d653182c6747b2c73dda8cefecc45 to your computer and use it in GitHub Desktop.

Select an option

Save david-murr/fb5d653182c6747b2c73dda8cefecc45 to your computer and use it in GitHub Desktop.
ggID='put_googleID_here'
ggURL='https://drive.google.com/uc?export=download'
filename="$(curl -sc /tmp/gcokie "${ggURL}&id=${ggID}" | grep -o '="uc-name.*</span>' | sed 's/.*">//;s/<.a> .*//')"
getcode="$(awk '/_warning_/ {print $NF}' /tmp/gcokie)"
curl -Lb /tmp/gcokie "${ggURL}&confirm=${getcode}&id=${ggID}" -o "${filename}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment