f=filename
id=1234567567567
url="https://docs.google.com/uc?export=download&id=${id}";
cookies=$(mktemp);
x=$(wget -q --save-cookies $cookies --keep-session-cookies --no-check-certificate $url -O-);
url2=https://docs.google.com$(echo $x|grep -Po 'uc-download-link" [^>]* href="\K[^"]*' | sed 's/\&/\&/g');
wget --load-cookies $cookies $url2 -O "$f";
沒有留言:
張貼留言