1
I'm on Mac OSX trying to use telnet to get a file off of google drive. I found that the following link template causes an automatic download of a file off of google drive:
http://drive.google.com/uc?id=documentId&export=download
where documentId is the id of the document (a combination of numbers and letters). So I go to the terminal, type telnet drive.google.com 80
and get connected to the server. Then I type GET /uc?id=documentId&export=download HTTP/1.1
, press enter, type Host: drive.google.com
, then press enter twice.
I'm pretty sure I followed the steps correctly, but for some reason, I always get a status code of 302 Moved Temporarily. Did I enter the URL wrong, are there some characters that need to be escaped? Any suggestions would be helpful.
is curl an actual command? Because I'm just using telnet to test out the HTTP request which later I'm going to use in a C++ program to download the file off the internet. – rcplusplus – 2012-07-24T03:39:40.733
And also, the "new location" link it gives me is this:
/uc?id=documentId&export=download
, which is the exact same thing [!] as the provided link save for the ampersand being replaced by&
– rcplusplus – 2012-07-24T03:43:02.570@rcplusplus: If it has something different, then it's not exactly the same thing, is it? – user1686 – 2012-07-24T11:20:51.587
@rcplusplus: And yes,
curl
is an actual command, but it also comes with alibcurl
library for C which is very convenient for downloading files over HTTP, among other things. – user1686 – 2012-07-24T11:21:22.173