部分下载wget [英] Partial download with wget

查看:167
本文介绍了部分下载wget的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到 curl 支持部分下载

-r, --range RANGE   Retrieve only the bytes within a range

示例

curl -r 0-99 http://foo.com/bar.mp4

$但是, wget 会完成类似的事情吗?

However, can wget accomplish something similar?

推荐答案

不幸的是 wget 没有这个功能(至少用我的 GNU Wget 1.10.2(Red Hat modified) code>),这是非常讨厌。您可以使用HTTP请求发送Range标头,但不起作用。

Unfortunately wget doesn't have this feature(at least with my GNU Wget 1.10.2 (Red Hat modified)), which is very annoying. You can send the Range header with HTTP request, but doesn't work.

wget "http://www.example.com"  -c --header="Range: bytes=0-99"

p>

It returns

HTTP request sent, awaiting response... 206 Partial Content
Giving up.

似乎wget有正确的响应,但奇怪的是,它没有完成它。例如对于详细模式输出:

It seemed that the wget had the proper response, but strangely, it didn't finish it. For example with verbose mode output:

HTTP request sent, awaiting response... 
  HTTP/1.0 206 Partial Content
  Accept-Ranges: bytes
  Cache-Control: max-age=604800
  Content-Range: bytes 0-99/1270
  Content-Type: text/html
  Date: Fri, 24 Jan 2014 08:35:18 GMT
  Etag: "359670651"
  Expires: Fri, 31 Jan 2014 08:35:18 GMT
  Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
  Server: ECS (ftw/FBA9)
  X-Cache: HIT
  Content-Length: 100
  Connection: keep-alive
Giving up.

这篇关于部分下载wget的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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