sr320 / course-fish546-2016

6 stars 5 forks source link

Using curl to download files from Google Drive? #80

Closed MeganEDuffy closed 7 years ago

MeganEDuffy commented 7 years ago

Has anyone ever used curl to get files from a Google Drive folder?

I tried to create an open, sharable link through GD and then use that url, but I only succeeded in getting the html page as you can see here. Has anyone tried this?

sr320 commented 7 years ago

First step is that it would have to be public.. Then not sure it would work -

see also https://github.com/prasmussen/gdrive

see also http://stackoverflow.com/questions/25010369/wget-curl-large-file-from-google-drive

MeganEDuffy commented 7 years ago

I thought I actually posted this response, but it was still editing, sorry

The GDrive command has been really helpful, thanks!

nabeelpredmac commented 6 years ago

using authorization token YYYY from developer page and file id XXXX in below command worked for me

curl -H "Authorization: Bearer YYYYY" https://www.googleapis.com/drive/v3/files/XXXXX?alt=media -o output_file_name

for detail follow the blog (not by me but following this worked for me ) https://insynout.blogspot.com/2017/01/secret-how-to-download-large-files-from.html