how to use wget to download shared zip file from google drive?

How do I download the zip files here using wget?

1 Answer

The files you see in that link are a part of a script your browser executes when browsing to that URL, while wget is incapable of doing such things. If you insist on using wget follow my answer, yet I encourage you to use any other available cli utils developed for google drive interaction using the terminal.

Using wget as a non dedicated google drive util:

What you need is the full URI of each of those files, and use it with wget.

You could get the direct URI by clicking with your right mouse button and choosing the "Get link option":

enter image description here

enter image description here

Note: make sure file sharing permissions are set to "Anyone with link", or else a direct wget download won't work (same goes for web browsers without a user logged in their google account).

Copy the link provided and replace the file/d/ with uc?id= and replace at the end of the link the /view?usp=sharing with &export=download.

With the new link created use wget to download the file: wget your_edited_link_here

For example: wget

Note: the link in the example won't work as I broke my file id intentionally so it won't share a real file from my drive.

Again, even if this method works it is really suggested to use standard utils such as gdrive, gdown, gshell or any other util demonstrated at the link I pasted at the beginning.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like