Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bash script to download large zip files from google drive while confirming the virus scan warning
# Usage: gdrive_download 123-abc ./
function gdrive_download () {
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "$1" -O- | sed -En 's/.*confirm=([0-9A-Za-z_]+).*/\1/p')
wget --load-cookies /tmp/cookies.txt "$CONFIRM&id=$1" -O $2
rm -f /tmp/cookies.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment