【发布时间】:2016-05-12 23:29:16
【问题描述】:
在 url here 有大量的 zip 文件,我需要下载并保存到 test/files/downloads 目录。我在提示符下使用 wget
wget -i http://bitly.com/nuvi-plz -P test/files/downloads
它会将整个页面下载到目录中的一个文件中,然后开始下载每个 zip 文件,但随后会为每个看起来像这样的文件提供 404
2016-05-12 17:12:28-- http://bitly.com/1462835080018.zip
Connecting to bitly.com|69.58.188.33|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://bitly.com/1462835080018.zip [following]
--2016-05-12 17:12:28-- https://bitly.com/1462835080018.zip
Connecting to bitly.com|69.58.188.33|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-05-12 17:12:29 ERROR 404: Not Found.
如何让 wget 正确下载页面上的所有 zip 文件?
【问题讨论】:
-
你不能。
302是一个重定向。但新位置没有 zip 文件。 -
你可以试试
wget -i http://feed.omgili.com/5Rh5AMTrc4Pv/mainstream/posts/ -P test/files/downloads。
标签: bash shell command-line wget