• Stars
    star
    927
  • Rank 47,580 (Top 1.0 %)
  • Language
    Perl
  • License
    GNU General Publi...
  • Created over 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

Google Drive direct download of big files

gdown.pl

Google Drive direct download of big files

Requirements

wget and Perl must be in the PATH.
Windows and linux compatible.

Usage

Use Google Drive shareable links, viewable by anyone:

$ ./gdown.pl 'gdrive file url' ['desired file name']   

Example

For example, to download this video from my axolotl project, just copy the url, and give a file name if desired:

$ ./gdown.pl https://drive.google.com/file/d/0B1L_hFrWJfRhLUJZdXdSdTdfSWs/edit axolotl.mp4   

Resuming a download

As long as a file name is indicated as second parameter, gdown.pl will try to resume the partially downloaded file if an incomplete file with that name already exists. Please note that for this to work, wget must correctly provide --spider with --server-response (-S). wget v1.17 at least is advised.

Download protected files

Download of protected files can be done manually exporting browers' auth cookies. With firefox or chrome browsers:

  1. authenticate in google drive or get access to the file download (and stop there, as you want to download it with gdown.pl)

  2. Now the browser has all the needed cookies: install cookies-txt for firefox and export them (all), or editthiscookie for chrome (in this case, change in Options the format of exportation to Netscape HTTP Cookie File)

  3. if using firefox and "cookies-txt" addon, open the cookies.txt exported file and remove the string "#HttpOnly_" from all lines. With vim this suffices: ":%s/^#HttpOnly_//" (and ":wq" to exit). If you're an experienced txt master, maintain only "^[^\s]*.google.com" lines, and remove from them the string "#HttpOnly_".

  4. copy the (cookies.txt) modified content (if using firefox and cookies-txt) or copy directly from the clipboard (if using chrome and editthiscookie addon) to gdown.cookie.temp file in the same directory where you'll run gdown.pl.

  5. run gdown.pl with your protected link

  6. It should now download the file, and any other file which needs access permissions with the account used in (1). But only until that session finishes.

Version

This version is v2.3.

Warning

Please, note that v1.2 (available between days 12 to 31 of Jan/2019) should not be used, as it contains a bug that could result in unusable downloaded files. Proceed to overwrite with v1.4 in case you have it.

Docker

A simple Docker file is provided, to build a simple Docker image with gdown.pl.
This has been used for pre-pulling data from a Google Drive to Kubernetes persistent volumes.
Thanks @anton-khodak

Singularity

An example Singularity file is provided.
Build the container: sudo singularity build (imagename) Singularity

Run the container: singularity run (imagename) (gdown.pl args)

Thanks to @ttbrunner

License

Distributed under GPL 3

Disclaimer

This software is provided "as is", without warranty of any kind, express or implied.

More info

https://circulosmeos.wordpress.com/2014/04/12/google-drive-direct-download-of-big-files

Contact

by circulosmeos

More Repositories

1

gztool

extract random-positioned data from gzip files with no penalty, including gzip tailing like with 'tail -f' !
C
123
star
2

bitcoin-in-tiny-pieces

Python scripts made from scratch to play with Bitcoin addresses
Python
36
star
3

circle

statistics ASCII circle for analysing byte entropy in files
C
21
star
4

FIFOStockSellProfitCalculator

calculates FIFO profits on a LibreOffice calc document with stocks' buys and sells in rows
Python
13
star
5

triops

triops: a multiplatform command-line encryption tool using CHACHA + KECCAK
C
7
star
6

bgztail

Continuous tail command (like `tail -f`) for bgzip files
Perl
5
star
7

LibreOfficeScriptInsert

inserts a python script (Macro) into a LibreOffice Calc document
Python
4
star
8

haveibeenpwned-binary

Convert haveibeenpwned.com Pwned Passwords 7z files to binary form, but still being able to quickly search inside them
Python
4
star
9

cpr

Copy to current path files searched with Perl regular expressions, recursively under subdirectories, in Windows and linux, with UTF-8 support
Perl
4
star
10

rnm

file renamer script for Windows and linux, with recursion and UTF-8 support
Perl
3
star
11

bytescircle

linux' bytes-circle port to R: statistics ASCII circle for analysing byte entropy in files
R
3
star
12

triops.apk

triops port to Android - Encrypt and decrypt files using CHACHA20+KECCAK
C
2
star
13

geiger_lcdnleds

code for the cooking-hacks.com's radiation detection board adapted to the Raspberry Pi (LCD and LEDs)
C++
1
star
14

axolotl

a simple plain text documentation system (for sysadmins)
Perl
1
star
15

Perl-with-Unicode-for-Windows

recompilation of Perl for Windows with Unicode support on command-line
C
1
star
16

geiger_tube

code for the cooking-hacks.com's radiation detection board adapted to the Raspberry Pi (console output)
C++
1
star
17

Arduino-radiation-cumulative-counter

cumulative counter for the cooking-hacks.com's radiation detection board for Arduino
Arduino
1
star
18

twisted2sv

2 Step Verification TOTP python script with mangled keys
Python
1
star
19

prepreprocessor

pre-preprocessor for C: extract different versions of code from the same source
Perl
1
star