Last active
November 29, 2019 04:46
-
-
Save NISH1001/7f9772a3a94ca0ff3f2b7035d8a00506 to your computer and use it in GitHub Desktop.
Get drive files using wget
This file contains hidden or 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
#wget --load-cookies /tmp/cookies.txt "https://drive.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id=<FILEID>' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=<FILEID>" -O <FILENAME> && rm -rf /tmp/cookies.txt | |
#/usr/bin/env bash | |
echo "i am paradox" | |
FILEID="1hJKCb4eF1AJih_dhZOJSF5VR-ZtRNaap" | |
FILENAME="model.zip" | |
link="https://drive.google.com/uc?export=download&id=$FILEID" | |
wget --load-cookies /tmp/cookies.txt "https://drive.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate $link -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$FILEID" -O $FILENAME && rm -rf /tmp/cookies.txt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment