I am trying to download a file from Google drive using wget
command but it is not working.
wget https://drive.google.com/uc?export=download&id=0B8ZGlkqDw7hFUzViMXE4akp4NGM
It is giving me the following error.
Resolving drive.google.com (drive.google.com)... 172.217.7.238
Connecting to drive.google.com (drive.google.com)|172.217.7.238|:443... connected.
HTTP request sent, awaiting response... 400 Bad Request
2017-06-30 16:49:26 ERROR 400: Bad Request.
The file is public on web and anyone can download it directly with the provided link. So, why it is not working with wget?
Set the folder setting to "anyone on the internet can find and view", then you will be able to download the file with wget https://googledrive.com/host/file_id for you that is wget https://googledrive.com/host/0B-Zc9K0k9q-WdEY5a1BCUDBaejQ .
Remember to keep the double quotes and also include the extension in FILENAME (for example, myfile. zip ). Now, save the file and make the file executable by running this command in terminal sudo chmod +x download-gdrive.sh . Run the script using `./download-gdrive.sh".
Works for me with quotes:
wget "https://drive.google.com/uc?export=download&id=0B8ZGlkqDw7hFUzViMXE4akp4NGM"
P.S. Looks like the ampersand is the problem. An alternative might be to escape them separately, but quoting seems simpler and safer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With