Skip to content

Commit

Permalink
update google download link.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed May 30, 2024
1 parent 4e13d57 commit 9193a2f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/download/download-gdrive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ function doDownloadGDrive() {
mkdir tmp
fi

curl -c ./tmp/cookie -s -L "https://drive.google.com/uc?export=download&id=${FILEID}" > /dev/null
local URL_COOKIE="https://drive.google.com/uc?export=download&id=${FILEID}"
# echo "COOKIE URL ${URL_COOKIE}"
curl -c ./tmp/cookie -s -L "${URL_COOKIE}" > /dev/null
COOKIE_CONFIRM=$(awk '/download/ {print $NF}' ./tmp/cookie)
cat ./tmp/cookie
# echo "COOKIE_CONFIRM: ${COOKIE_CONFIRM}"

if [[ "" == "${COOKIE_CONFIRM}" ]]; then
COOKIE_CONFIRM="t"
fi

curl -Lb ./tmp/cookie "https://drive.google.com/uc?export=download&confirm=${COOKIE_CONFIRM}&id=${FILEID}" -o ${FILENAME}
local URL_DOWNLOAD="https://drive.usercontent.google.com/download?export=download&&authuser=0&confirm=${COOKIE_CONFIRM}&id=${FILEID}"
# echo "DOWNLOADING ${URL_DOWNLOAD} to ${FILENAME}"
curl -Lb ./tmp/cookie "${URL_DOWNLOAD}" -o ${FILENAME}

}

Expand Down

0 comments on commit 9193a2f

Please sign in to comment.