【发布时间】:2023-03-31 23:58:01
【问题描述】:
我有一个共享的 google drive 文件夹链接(互联网上任何拥有此链接的人都可以查看)如下 例如:https://drive.google.com/drive/folders/1i_c8LhSLf-LttV-UOMDcY4rLAalxxxx?usp=sharing
我想使用任何 wget/CURL/任何 python 包下载。
我已经尝试了以下方法,但它不起作用。
curl -L "https://drive.google.com/uc?id=1i_c8LhSLf-LttV-UOMDcY4rLAalkcayn&export=download" > test.tar.gz
import gdown
import time
url='https://drive.google.com/uc?id=1i_c8LhSLf-LttV-UOMDcY4rLAalkxxxx'
output='/data/test/test.zip'
time.sleep(100)
gdown.download(url, output, quiet=False)
错误:
Permission denied: https://drive.google.com/uc?id=1i_c8LhSLf-LttV-UOMDcY4rLAalkcayn
Maybe you need to change permission over 'Anyone with the link'?
以下命令适用于文件,但不适用于文件夹
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=11e85AnMEGEjrxPuewlmeg-ABOZ8asdf' -O test
提前感谢您的帮助!
【问题讨论】:
-
例如,在您的情况下,这个 CLI 工具有用吗? github.com/tanaikech/goodls#downloadfilesfromfolder
标签: python-3.x linux curl wget gdrive