2013-11-21 156 views
5

這裏是我的命令的例子:如何使用wget從網站下載所有圖像?

wget -r -l 0 -np -t 1 -A jpg,jpeg,gif,png -nd --connect-timeout=10 -P ~/support --load-cookies cookies.txt "http://support.proboards.com/" -e robots=off 

Based on the input here

但沒有真正被下載,沒有遞歸爬行,它只需幾秒鐘即可完成。我試圖從論壇備份所有圖像,論壇結構是否會導致問題?

+1

http://stackoverflow.com/questions/4602153/how-do-i-use-wget-to-download-all-images-into-a-single-folder/21089847#comment33143483_21089847的可能的複製 –

回答

16
wget -r -P /download/location -A jpg,jpeg,gif,png http://www.site.here 

作品就像另一名魅力

+0

在我的情況下,這隻下載'robots.txt'文件只有 – vladkras

+0

萬一你只能得到robots.txt,那麼你可以追加'-e robots =關 - 等待1 http://www.site.here '到你的wget命令。這將覆蓋robots.txt文件並提取您正在查找的內容。例如: wget -r -P/download/location -A jpg,jpeg,gif,png -e robots = off - 等待1 http://www.site.here –

0

下載圖像文件。 這裏我提供wget.zip文件名,如下所示。

# wget -O wget.zip http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz 
--2012-10-02 11:55:54-- http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz 
Resolving ftp.gnu.org... 208.118.235.20, 2001:4830:134:3::b 
Connecting to ftp.gnu.org|208.118.235.20|:80... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 446966 (436K) [application/x-gzip] 
Saving to: wget.zip 
100%[===================================================================================>] 446,966  60.0K/s in 7.5s 
2012-10-02 11:56:02 (58.5 KB/s) - wget.zip