download files from googledrive using command lines

#!/bin/bash

youtube-dl https://drive.google.com/open?id=3PIY9dCoWRs-930HHvY-3-FOOPrIVoBAR

#FILENAME='outfit_data.txt.zip'

#FILEID='1HFKUqBe5oMizU0lxy6sQE5Er1w9x-cC4'

#wget --load-cookies /tmp/cookies.txt "https://drive.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=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt

#curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null

#curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}

#rm ./cookie

#youtube-dl https://drive.google.com/open?id=1HFKUqBe5oMizU0lxy6sQE5Er1w9x-cC4

#https://drive.google.com/file/d/1HFKUqBe5oMizU0lxy6sQE5Er1w9x-cC4/view?usp=sharing

##filename='outfit_data.txt.zip'

#3fileid='3PIY9dCoWRs-930HHvY-3-FOOPrIVoBAR'

#fffile_id = '3PIY9dCoWRs-930HHvY-3-FOOPrIVoBAR'

#fileid='1G_1SV9H7fQMPPJOBmZpCnCkgifSsb9Ar'

##curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null

##curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}

#wget --no-check-certificate "https://drive.google.com/uc?export=download&id=${fileid}" -O ${filename}

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容