2

I want to download google drive folders file via wget how it is possible?

I have folder version in google drive and in that version folder all version apk file of my mobile app.

Folder tree like this

Version : -> mobileapp1.apk
          -> mobileapp2.apk
          -> mobileapp3.apk

And I want to download by passing version name. Is it possible with google drive and wget? I have already make folder Public on the web - Anyone on the Internet

4 Answers 4

1

You need to get each fileID from google drive and generate links like described here in google forum

A FTP Server would make things easier.

0

Good day! I do not know which distribution you use, but some of them can connect to Google Drive by the operating system itself. For example, Fedora. It is enough to set up network accounts... After that, access to the Disk will be through the file manager.

0

To download with wget:

wget --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=FIELDID' -O FILENAME 

where FILENAME is the output file name you want, like mobileapp1.apk and FIELDID is the ID in your file link.

Example

https://drive.google.com/file/d/xxx/view

xxx will be your file ID.

0

I answered this question in another question: Downloading large folder from google drive

I wrote a Python code using the PyDrive library, that can recursively retrieve the sub-folders and files inside a parent folder. Using the ids of the files, I then generated a bash script using wget.

Step 1 I have used the PyDrive library. To use this library, you have to complete the instructions described in this link.

Step 2 Now, create a python script or notebook in the same working directory, where you have saved the “client_secrets.json” file. I have attached the notebook below.

https://gist.github.com/immuntasir/73b8e8eef7e6c9066aaf2432bebf7db0

Step 3 Using scp, copy the “script.sh” to the remote server. scp ~/path/script.sh username@ip:path

Step 4 Login to the remove server, navigate to the path. Then make the script executable using the following command. chmod 777 script.sh Run the script and voila! ./script.sh

I also wrote a tutorial, which can be found here: https://medium.com/@immuntasir/recursively-download-all-the-contents-of-a-google-drive-folder-using-python-wget-and-a-bash-script-d8f2c6b105d5

Hope this helps!

1
  • This requires the user of the script to enable google drive API and authenticate, for what otherwise doesn't require any authentication through the browser. Commented Aug 8, 2020 at 0:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .