-1

I only have access to a jupyter notebook on a server and I need to download and unzip a large file on Google Drive. Here is the link. I am using python 3. This is a large dataset of images that is 37GB unzipped. I wasn't able to get Urllib to work, I am guessing it has to do with it being https but I have no idea.

What link should I use? Should I use the link to the page or the link on the button on that page?

I do not want it as text so it is unlike this question.

user18101
  • 626
  • 3
  • 13
  • 22
  • 1
    Downloading a text file should work no differently than downloading a several gigabyte zip file. Whether you treat the contents of the file as text or not *after you've downloaded it* should not affect how you download it. – mkrieger1 Jun 20 '17 at 14:06
  • @mkrieger1 The other question does not go into how to download the file in addition to turning the file into a text file. – user18101 Jun 20 '17 at 14:35

1 Answers1

0

You will have to use the Google Drive API for that.

Google Drive API: https://developers.google.com/drive/v3/web/manage-downloads

Here is an example provided on the website to download a file from the drive:

file_id = '0BwwA4oUTeiV1UVNwOHItT0xfa2M'
request = drive_service.files().get_media(fileId=file_id)
fh = io.BytesIO()
downloader = MediaIoBaseDownload(fh, request)
done = False
while done is False:
    status, done = downloader.next_chunk()
    print "Download %d%%." % int(status.progress() * 100)
Flaviops
  • 143
  • 1
  • 2
  • 7