Issue
I'm having trouble using wget for my Debian 7.0 VPS server hosted by OVH.
I'm trying to download a ZIP file from MediaFire, and when I connected via SSH I typed,
wget http://download1472.mediafire.com/5ndlsskkyfmg/dgx7zbbdbxawbwd/Vhalar-GGJ16.zip
Then, this is my output,
--2016-03-07 20:17:52-- http://download1472.mediafire.com/5ndlsskkyfmg/dgx7zbbd bxawbwd/Vhalar-GGJ16.zip
Resolving download1472.mediafire.com (download1472.mediafire.com)... 205.196.123 .160
Connecting to download1472.mediafire.com (download1472.mediafire.com)|205.196.12 3.160|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.mediafire.com/?dgx7zbbdbxawbwd [following]
--2016-03-07 20:17:52-- http://www.mediafire.com/?dgx7zbbdbxawbwd
Resolving www.mediafire.com (www.mediafire.com)... 205.196.120.6, 205.196.120.8
Connecting to www.mediafire.com (www.mediafire.com)|205.196.120.6|:80... connect ed.
HTTP request sent, awaiting response... 301
Location: /download/dgx7zbbdbxawbwd/Vhalar-GGJ16.zip [following]
--2016-03-07 20:17:52-- http://www.mediafire.com/download/dgx7zbbdbxawbwd/Vhala r-GGJ16.zip
Connecting to www.mediafire.com (www.mediafire.com)|205.196.120.6|:80... connect ed.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `Vhalar-GGJ16.zip'
[ <=> ] 94,265 440K/s in 0.2s
2016-03-07 20:17:52 (440 KB/s) - `Vhalar-GGJ16.zip' saved [94265]
The download took less than 1 second, and it's a 280MB zip file. Also, it seems to say "440 KB/s", and that math just doesn't add up.
I'm confused as to why I can't download this zip file to my server via SSH, instead of downloading it to my computer, then re-uploading it to the server.
Does anyone see a flaw I'm making in my command?
Solution
Look at the contents of the 94kb file that you downloaded in something like vi. Odds are it's not a zip file, but a html file, telling you what went wrong, and what you need to do to download the file.
A browser would have known this (the mime type would tell it that it is being served HTML, and it would display it to you rather than download it).
It is likely that this is a measure by Mediafire to prevent automated downloads of their files. It's possible that spoofing the user-agent header might help, but unlikely.
Answered By - Dewi Morgan Answer Checked By - Gilberto Lyons (WPSolving Admin)