wget file from google drive


January 31, 2014

Sometimes it is useful, even more if you have a chromebook, to upload a file to Google Drive and then use wget to retrieve it from a server remotely.

In order to do this you need to make the file available to “Anyone with the link”, then click on that link from your local machine and get to the download page that displays a Download button. Now right-click and select “Show page source” (in Chrome), and search for “downloadUrl”, copy the url that starts with https://docs.google.com, for example:


This is unicode, so open Python and do:

download_url = "PASTE HERE"
print download_url.decode("unicode_escape")

The last url can be pasted into a terminal and used with wget.