Wget 从 URL 下载不完整的文件 [英] Wget downloading incomplete file from a URL

查看:92
本文介绍了Wget 从 URL 下载不完整的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 linux 系统上下载一个文件,其 url 为

I want to get a file downloaded on my linux system whose url is

http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jre-7u51-linux-i586.tar.gz  

我发出以下命令:

wget -U 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:16.0) Gecko/20100101 Firefox/16.0' http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jre-7u51-linux-i586.tar.gz

而用户代理被传递给 -U,我从浏览器的用户代理中复制了它.但它只下载了 5.3KB 的文件,而整个文件有 46.09MB,并且下载的文件已损坏.

whereas the user agent is being passed to -U which i have copied from my browser's user agent. But it downloads the file only of size 5.3KB whereas entire file is 46.09MB and the downloaded file is corrupted.

我该如何解决这个问题?

How can I resolve this issue?

推荐答案

查看输出,您会发现 oracle 拒绝了请求,包含以下消息:

Looking at the output, you will realize that oracle denied the request, containing following message:

为了从 Oracle 技术网下载产品,您必须同意 OTN 许可条款.

In order to download products from Oracle Technology Network you must agree to the OTN license terms.

请确保...

  • 您的浏览器启用了cookies"和 JavaScript.
  • 您点击了要下载的产品的接受许可".
  • 您在接受许可后 30 分钟内尝试下载.

很可能您必须发送一些 GET 或 POST 值和/或保留会话数据.

Most probably you have to send some GET or POST value and/or keep session data.

这篇关于Wget 从 URL 下载不完整的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆