gdown

Download a large file from Google Drive (curl/wget fails because of the security notice).

Github星跟踪图

Description

Download a large file from Google Drive.
If you use curl/wget, it fails with a large file because of
the security warning from Google Drive.

Installation

pip install gdown

Usage

From Command Line

$ usage: gdown [-h] [-V] [-O OUTPUT] [-q] [--id] [--proxy PROXY] [--speed SPEED] url_or_id

$ # a large file (~400MB)
$ gdown https://drive.google.com/uc?id=0B_NiLAzvehC9R2stRmQyM3ZiVjQ
$ # gdown --id 0B_NiLAzvehC9R2stRmQyM3ZiVjQ
$ md5sum pose_estimation_2d_chainermodel.pkl
587933c2c0adf335ebed0486c183541f

$ # a small file
$ gdown https://drive.google.com/uc?id=0B9P1L--7Wd2vU3VUVlFnbTgtS2c
$ cat spam.txt
spam

$ # as an alternative to curl/wget
$ gdown https://httpbin.org/ip -O ip.json
$ cat ip.json
{
  "origin": "126.169.213.247"
}

$ # write stdout and pipe to extract
$ gdown https://drive.google.com/uc?id=0B9P1L--7Wd2vNm9zMTJWOGxobkU -O - --quiet, tar zxvf -
$ ls 20150428_collected_images/

$ # it can handle urls created from [Share] -> [Copy Url] on Google Drive
$ gdown 'https://drive.google.com/a/jsk.imi.i.u-tokyo.ac.jp/uc?id=0B_NiLAzvehC9R2stRmQyM3ZiVjQ'

From Python

import gdown

url = 'https://drive.google.com/uc?id=0B9P1L--7Wd2vU3VUVlFnbTgtS2c'
output = 'spam.txt'
gdown.download(url, output, quiet=False)

License

See LICENSE.

主要指标

概览
名称与所有者wkentaro/gdown
主编程语言Python
编程语言Python (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2015-10-17 03:01:23
推送于2024-08-12 16:54:10
最后一次提交
发布数92
最新版本名称v5.2.0 (发布于 )
第一版名称1.0.0 (发布于 )
用户参与
星数4.6k
关注者数23
派生数366
提交数515
已启用问题?
问题数184
打开的问题数45
拉请求数106
打开的拉请求数7
关闭的拉请求数35
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?