Sunday, 10 November 2019

Wget big file from google drive public shared files in Linux

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=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt

* FILENAME is what the filename in server with extension. example xdownload.zip 
* FILEID is the id from google shared link. example "https://drive.google.com/file/d/12yLOgEUfM1tBxmrSkPHcJmeKenefeKN5/view?usp=sharing" in this link 12yLOgEUfM1tBxmrSkPHcJmeKenefeKN5 is the file id.


Hope it helps...👍 

No comments:

Post a Comment