[feature] download google drive with wget

This commit is contained in:
Klesh Wong 2021-01-04 18:25:36 +08:00
parent c0a69e7e6f
commit 88aafe0389

3
bin/dl_google_drive Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
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='$1 -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$1" -O $2 && rm -rf /tmp/cookies.txt