From 88aafe03890937f341338c4b10ed8d5b2fe603bd Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 4 Jan 2021 18:25:36 +0800 Subject: [PATCH] [feature] download google drive with wget --- bin/dl_google_drive | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 bin/dl_google_drive diff --git a/bin/dl_google_drive b/bin/dl_google_drive new file mode 100644 index 0000000..dc2f23d --- /dev/null +++ b/bin/dl_google_drive @@ -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