仓库地址
https://github.com/wkentaro/gdown
安装
pip install gdown
命令行参数
λ gdown --help
usage: gdown [-h] [-V] [-O OUTPUT] [-q] [--fuzzy] [--id] [--proxy PROXY] [--speed SPEED] [--no-cookies] [--no-check-certificate] [--continue] [--folder]
[--remaining-ok]
url_or_id
positional arguments:
url_or_id url or file/folder id (with --id) to download from
optional arguments:
-h, --help show this help message and exit
-V, --version display version (default: None)
-O OUTPUT, --output OUTPUT
output file name / path (default: None)
-q, --quiet suppress standard output (default: False)
--fuzzy (fild only) extract Google Drive's file ID (default: False)
--id flag to specify file/folder id instead of url (default: False)
--proxy PROXY <protocol://host:port> download using the specified proxy (default: None)
--speed SPEED download speed limit in second (e.g., '10MB' -> 10MB/s) (default: None)
--no-cookies don't use cookies in ~/.cache/gdown/cookies.json (default: False)
--no-check-certificate
don't check the server's TLS certificate (default: False)
--continue, -c (file only) resume getting a partially-downloaded file (default: False)
--folder download entire folder instead of a single file (max 50 files per folder) (default: False)
--remaining-ok (folder only) asserts that is ok to download max 50 files per folder. (default: False)
简单示例
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ
# gdown --id 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ
# 下载Google Drive文件夹
gdown https://drive.google.com/drive/folders/1ivUsJd88C8rl4UpqpxIcdI5YLmRD0Mfj -O /tmp/folder --folder