• Stars
    star
    3,407
  • Rank 13,088 (Top 0.3 %)
  • Language
    Python
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

gdown

Download a large file from Google Drive.


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. Supports downloading from Google Drive folders (max 50 files per folder).

Installation

pip install gdown

# to upgrade
pip install --upgrade gdown

Usage

From Command Line

$ 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
...

$ # a large file (~500MB)
$ gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ
$ md5sum fcn8s_from_caffe.npz
256c2a8235c1c65e62e48d3284fbd384

$ # same as the above but with the file ID
$ gdown 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ

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

$ # download with fuzzy extraction of a file ID
$ gdown --fuzzy 'https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing&resourcekey=0-WWs_XOSctfaY_0-sJBKRSQ'
$ cat spam.txt
spam

$ # --fuzzy option also works with Microsoft Powerpoint files
$ gdown --fuzzy "https://docs.google.com/presentation/d/15umvZKlsJ3094HNg5S4vJsIhxcFlyTeK/edit?usp=sharing&ouid=117512221203072002113&rtpof=true&sd=true"

$ # a folder
$ gdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl -O /tmp/folder --folder

$ # 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://github.com/wkentaro/gdown/archive/refs/tags/v4.0.0.tar.gz -O - --quiet | tar zxvf -
$ ls gdown-4.0.0/
gdown  github2pypi  LICENSE  MANIFEST.in  pyproject.toml  README.md  setup.cfg  setup.py  tests

From Python

import gdown

# a file
url = "https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ"
output = "fcn8s_from_caffe.npz"
gdown.download(url, output, quiet=False)

# same as the above, but with the file ID
id = "0B9P1L--7Wd2vNm9zMTJWOGxobkU"
gdown.download(id=id, output=output, quiet=False)

# same as the above, and you can copy-and-paste a URL from Google Drive with fuzzy=True
url = "https://drive.google.com/file/d/0B9P1L--7Wd2vNm9zMTJWOGxobkU/view?usp=sharing"
gdown.download(url=url, output=output, quiet=False, fuzzy=True)

# cached download with identity check via MD5
md5 = "fa837a88f0c40c513d975104edf3da17"
gdown.cached_download(url, output, md5=md5, postprocess=gdown.extractall)

# a folder
url = "https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl"
gdown.download_folder(url, quiet=True, use_cookies=False)

# same as the above, but with the folder ID
id = "15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl"
gdown.download_folder(id=id, quiet=True, use_cookies=False)

License

See LICENSE.

More Repositories

1

labelme

Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation).
Python
10,986
star
2

pytorch-fcn

PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)
Python
1,695
star
3

pytorch-for-numpy-users

PyTorch for Numpy users. https://pytorch-for-numpy-users.wkentaro.com
HTML
660
star
4

imgviz

Image Visualization Tools (object detection, semantic and instance segmentation)
Python
232
star
5

morefusion

MoreFusion: Multi-object Reasoning for 6D Pose Estimation from Volumetric Fusion, CVPR 2020
Python
227
star
6

fcn

Chainer Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)
Python
218
star
7

video-cli

Command line tools for quick video editing.
Python
121
star
8

gshell

Navigate in Google Drive as you do on shell (gshell = Google Drive + Shell).
Python
102
star
9

octomap-python

Python binding of the OctoMap library.
Cython
71
star
10

call-python-from-cpp

Example Code of Calling Python from C++ with PyBind11.
C++
57
star
11

chainer-mask-rcnn

Chainer Implementation of Mask R-CNN. (Training code to reproduce the original result is available.)
Python
55
star
12

reorientbot

ReorientBot: Learning Object Reorientation for Specific-Posed Placement, ICRA 2022
Python
49
star
13

safepicking

SafePicking: Learning Safe Object Extraction via Object-Level Mapping, ICRA 2022
Python
48
star
14

pascal3d

Toolkit for PASCAL3D dataset.
Python
32
star
15

dotfiles

My dotfiles.
Shell
31
star
16

conque.vim

[MIRROR] Run interactive commands inside a Vim buffer.
Python
23
star
17

moviepy-cli

Command line interface for MoviePy.
Python
23
star
18

logboard

logboard: Monitor and Compare Logs on Browser/Terminal.
Python
21
star
19

label-fusion

Volumetric Fusion of Multiple Semantic Labels and Masks
C++
19
star
20

jqk

Render a JSON with jq patterns.
Rust
16
star
21

github2pypi

Release tools from GitHub to PyPi.
Python
14
star
22

imgviz-cpp

Image Visualization Tools for C++
C++
13
star
23

hrp2_apc

3D Object Segmentation for Shelf Bin Picking by Humanoid with Deep Learning and Occupancy Voxel Grid Map (Humanoids2016)
Common Lisp
12
star
24

chainer-cyclegan

Chainer implementation of "Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Network".
Python
10
star
25

sdf-object-model-descriptor

Python
8
star
26

screenshot-manager

Organize screenshot/screencast in a uniform manner.
Python
7
star
27

pytorch-fc-densenet

Python
7
star
28

chainer-bicyclegan

Chainer implementation of "Toward Multimodal Image-to-Image Translation".
Python
7
star
29

rfcn

Recurrent Fully Convolutional Networks for Instance-level Object Segmentation.
Python
7
star
30

pycd

`cd` to python modules.
Python
7
star
31

homebrew-trr

[DEPRECATED] TRR (typing software on Emacs) as formula for Homebrew.
Ruby
5
star
32

vgg16

VGG16 object recognition network. (Chainer Implementation)
Python
5
star
33

apc-object-detection

Object detection for Amazon Picking Challenge.
Python
5
star
34

cython_catkin_example

Simple example of Catkin + Cython.
CMake
5
star
35

real-harem

Transgender of real persons to achieve real harem, with mixed reality on Hololens.
Python
4
star
36

togif

Moved to https://github.com/wkentaro/video-cli
Python
4
star
37

label_octomap

Probabilistic 3D Multilabel Real-time Mapping for Multi-object Manipulation (IROS2017)
Python
4
star
38

gotenshita

See Gotenshita(御殿下) court open status.
Python
4
star
39

chainer-modelzoo

Model-Zoo for Chainer.
Python
4
star
40

imgviz_ros

Python
3
star
41

covid-vs-vaccine-mortality-japan

コロナ罹患とワクチン接種の死亡率比較
Python
3
star
42

Install-trr

Installation script for TRR (typing software on Emacs) on Ubuntu.
Shell
3
star
43

jsk_201604_cmo

Catch Moving Object (CMO) task project from April 2016.
Python
3
star
44

lecture2017s-agent-system

2
star
45

wstool_cd

`cd` to repos in workspace managed by wstool.
Python
2
star
46

python-packages

Python
2
star
47

continuous_teaching

CMake
2
star
48

wkentaro.github.io

My personal page.
HTML
2
star
49

ros-tips

Tips to be left as written text.
2
star
50

CV

My curriculum vitae (CV).
TeX
2
star
51

jqk-python

Render a JSON with jq patterns. Faster version in Rust -> https://github.com/wkentaro/jqk
Python
2
star
52

lecture2014w-utmi-intelligent-mechano-informatics

Assignments of Intelligent Mechano Informatics lesson.
Python
2
star
53

convenience_store_objects

CMake
2
star
54

lecture2016a-aai-ist

Jupyter Notebook
2
star
55

homebrew-labelme

Homebrew installation of labelme.
Ruby
2
star
56

pytorch-vgg

Python
2
star
57

jsk_20160407_evaluate_realsense

Shell
1
star
58

jsk_20160405_vacuum2015_graspability

Python
1
star
59

apc-object-detection-old

Python
1
star
60

trimesh-glooey

Python
1
star
61

tensorflow-fcn

Python
1
star
62

google-calendar-manager

Python
1
star
63

auto-argcomplete

🐍 Auto argument completion util for human.
Python
1
star
64

hackerrank

Python
1
star
65

smile-of-the-day

Python
1
star
66

mysite.com

django tutorial package (mysite.com)
Python
1
star
67

d-image-pipeline

Python
1
star
68

logcal

CSS
1
star
69

lecture2016w-advanced-statistical-modeling-report

TeX
1
star
70

lecture2017s-image-system

C++
1
star
71

acml-paper-template

TeX
1
star
72

euspy

Common Lisp
1
star
73

multisettings

Tool to handle multiple settings for editor, shell and other command line tools.
Python
1
star
74

reference

Python
1
star
75

octomap-python-wheels

Build wheels for wkentaro/octomap-python.
Shell
1
star
76

personal-notes

My personal notes.
Python
1
star
77

awesome-eus

A curated list of awesome Euslisp documents, functions and macros.
Common Lisp
1
star
78

cython-tutorials

Python
1
star
79

citations

[DEPRECATED] My citations.
TeX
1
star
80

jsk-data-aries-scripts

Shell
1
star
81

dakoku

dakoku
Python
1
star
82

apc-data

Python
1
star
83

gci-case-study

Case Study in GCI, which is a program improving the skills of analyzing big data.
Python
1
star
84

jsk_20160505_test_message_filters

Testing message_filters Python interface in JSK on May 5th in 2016.
Python
1
star
85

wstool_catkin

catkin env hooks providing bash completion and setting ROS_WORKSPACE in devel space
EmberScript
1
star
86

lecture2014s-utmech-soft2

Sample codes in "ソフトウェア第二", which is a class about software engineering in UTokyo.
Python
1
star
87

homebrew-pycd

Homebrew tap repository for wkentaro/pycd.
Ruby
1
star
88

Introduction2Algorithms

Python
1
star
89

utaskweb_syllabus

crawling the contents in UTask-Web
Python
1
star
90

eus-for-pythonista

Common Lisp
1
star
91

test-euslisp-in-package

Common Lisp
1
star
92

lora

Hubot named lora, who is working in JSK Robotics Team.
CoffeeScript
1
star
93

ros_fcn_3d

Python
1
star
94

ros-pkg

Python
1
star
95

bibtex

TeX
1
star
96

py-fast-rcnn

Python
1
star
97

jsk_20160228_evaluate_pick_and_verify

Python
1
star
98

ros_beginner_tutorials

ROS pakage for beginners served at http://wiki.ros.org.
Python
1
star
99

effective-python

Python
1
star
100

lecture2016w-practical-english-ii-report

TeX
1
star