【发布时间】:2015-09-24 07:44:38
【问题描述】:
我想一键下载整个网站的所有html、css和js文件。我尝试右键单击并查看源代码,但随后我必须复制粘贴每个页面并自己创建文件夹,因此非常乏味。是否有任何开源软件可以帮助做到这一点,还是我必须自己编写代码?
【问题讨论】:
我想一键下载整个网站的所有html、css和js文件。我尝试右键单击并查看源代码,但随后我必须复制粘贴每个页面并自己创建文件夹,因此非常乏味。是否有任何开源软件可以帮助做到这一点,还是我必须自己编写代码?
【问题讨论】:
wget 是你的朋友,它适用于 windows、mac 和 linux。
wget -r -np -k http://yourtarget.com/even/path/down/if/you/need/it/
-r is recursive
-np (do not follow links to parent directories)
-k to make links in downloaded HTML or CSS point to local files
其他有用的选项:
-nd (no directories): download all files to the current directory
-e robots.off: ignore robots.txt files, do not download robots.txt files
-A png,jpg: accept only files with the extensions png or jpg
-m (mirror): -r --timestamping --level inf --no-remove-listing
【讨论】:
右键单击>将页面另存为
将下载所有的 css 和 js/html。
【讨论】: