Skip to content

Instantly share code, notes, and snippets.

@amorev
Last active October 17, 2019 12:33
Embed
What would you like to do?
Wget file from Google Drive
# Change FILE_ID to ID of File in google drive.
# Change FILE_NAME to File name, which you want to use for save file
FILE_ID=FILE_ID FILE_NAME=FILE_NAME wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=$FILE_ID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$FILE_ID" -O $FILE_NAME && rm -rf /tmp/cookies.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment