如何下载整个网站的前端

时间:2015-09-23 22:04:14

标签: html web

我想一键下载整个网站的所有html,css和js文件。我尝试右键单击并查看源代码,但后来我必须复制粘贴每个页面并自己创建文件夹,因此它非常繁琐。是否有任何开源软件可以帮助我做到这一点,还是我必须自己编写代码?

2 个答案:

答案 0 :(得分:5)

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

答案 1 :(得分:-3)

右键点击>将页面另存为

将下载所有css和js / html。