Skip to content

Instantly share code, notes, and snippets.

function download_google_drive {
SRC=$1
DST=$2
echo "$SRC -> $DST"
curl -c /tmp/cookies "https://drive.google.com/uc?export=download&id=$SRC" > /tmp/intermezzo.html
DL_LINK=$(cat /tmp/intermezzo.html |\
grep -Po 'uc-download-link" [^>]* href="\K[^"]*' |\
sed 's/\&/\&/g'
)