Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save iamtekeste/3cdfd0366ebfd2c0d805 to your computer and use it in GitHub Desktop.

Select an option

Save iamtekeste/3cdfd0366ebfd2c0d805 to your computer and use it in GitHub Desktop.
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
wget -O file https://googledrive.com/host/[ID]
@zihaozhang9

zihaozhang9 commented Dec 20, 2021 via email

Copy link
Copy Markdown

@zihaozhang9

zihaozhang9 commented Jan 20, 2022 via email

Copy link
Copy Markdown

@Johnqczhang

Copy link
Copy Markdown

Only this worked for a 68G file.

This works for a 188G file! Thanks a lot!

@luisnquin

Copy link
Copy Markdown

@beliys <3

@iolathief108

Copy link
Copy Markdown

@LL3RD Worked for me

@wangc39

wangc39 commented Jun 21, 2022

Copy link
Copy Markdown

Only this worked for a 68G file.

This works for a 3.3G file with a so fast speed. Thanks a lot!

@zihaozhang9

zihaozhang9 commented Jun 21, 2022 via email

Copy link
Copy Markdown

@bhosalems

bhosalems commented Jul 18, 2022

Copy link
Copy Markdown

How can I download the dataset here https://drive.google.com/drive/folders/0BweDykwS9vIoUG5nNGRjQmFLTGM?resourcekey=0-dHhRVxB0LDUcUVtASUIgTQ
I want to download Stanford3dDataset_v1.2.tar

@zihaozhang9

zihaozhang9 commented Jul 18, 2022 via email

Copy link
Copy Markdown

@vieirafb

Copy link
Copy Markdown

wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.confirm=([0-9A-Za-z_]+)./\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt

Thanks, @beliys! It worked perfectly for me.

@zihaozhang9

zihaozhang9 commented Oct 30, 2023 via email

Copy link
Copy Markdown

ghost commented Feb 9, 2024

Copy link
Copy Markdown

Why not work, kinda. The file is 886MB but it download its html file...

u0_a227@localhost ~
└─▶ wget --load-cookies $TMPDIR/cookies.txt "https://drive.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies $TMPDIR/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id=1IPQdFtw6ukMcDfgaxf-qPjtk9Iy34el0' -O- | sed -rn 's/.confirm=([0-9A-Za-z_]+)./\1\n/p')&id=1IPQdFtw6ukMcDfgaxf-qPjtk9Iy34el0" -O glibc.tar.xz && rm -rf $TMPDIR/cookies.txt
--2024-02-09 10:42:51-- https://drive.google.com/uc?export=download&confirm=&id=1IPQdFtw6ukMcDfgaxf-qPjtk9Iy34el0
Resolving drive.google.com (drive.google.com)... 142.251.220.142, 2404:6800:4017:801::200e
Connecting to drive.google.com (drive.google.com)|142.251.220.142|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://drive.usercontent.google.com/download?id=1IPQdFtw6ukMcDfgaxf-qPjtk9Iy34el0&export=download [following]
--2024-02-09 10:42:51-- https://drive.usercontent.google.com/download?id=1IPQdFtw6ukMcDfgaxf-qPjtk9Iy34el0&export=download
Resolving drive.usercontent.google.com (drive.usercontent.google.com)... 142.251.220.193, 2404:6800:4017:803::2001
Connecting to drive.usercontent.google.com (drive.usercontent.google.com)|142.251.220.193|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2434 (2.4K) [text/html]
Saving to: ‘glibc.tar.xz’

glibc.tar.xz 100%[=================>] 2.38K --.-KB/s in 0.02s

2024-02-09 10:42:53 (115 KB/s) - ‘glibc.tar.xz’ saved [2434/2434]

u0_a227@localhost ~
└─▶

@Ayush-00

Copy link
Copy Markdown

Only this worked for a 68G file.

This worked for me too! Thanks!

@zihaozhang9

zihaozhang9 commented Jul 17, 2024 via email

Copy link
Copy Markdown

@surajvarma0090

Copy link
Copy Markdown

I found a blog article that shows how to download Google Drive files using the Linux terminal. It includes a step-by-step guide and a video. Check it out here.

@zihaozhang9

zihaozhang9 commented Jul 31, 2024 via email

Copy link
Copy Markdown

@pengyuan041013

Copy link
Copy Markdown

Why can't my model open this URL: https://docs.google.com/uc?export=download? It might be due to network issues. Please check the link's validity and try again later.

@zihaozhang9

zihaozhang9 commented Mar 19, 2025 via email

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment