Html 如何保存网站源代码中的所有文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11662902/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to save all files from source code of a web site?
提问by RAN
I want to download all files (html, images, js, css) from one website. I can download each and every file separately.
我想从一个网站下载所有文件(html、图像、js、css)。我可以单独下载每个文件。
I tried in Google Chrome, after clicking on the view source
, then ctrl + s
then saved as sample.html
then I got one sample.html
and also one sample folder contains all files like css, js, images etc. But again I am trying to do the same, but it's not.
我在谷歌浏览器中尝试过,点击view source
,然后ctrl + s
另存为sample.html
然后我得到了一个sample.html
示例文件夹,其中包含所有文件,如 css、js、图像等。但我再次尝试做同样的事情,但事实并非如此。
So earlier how it works? Why is it not working now?
那么早些时候它是如何工作的?为什么它现在不起作用?
Note:It's only for study purpose, not for copying any website of web contents.
注:仅供学习使用,不得复制任何网站的网页内容。
回答by Prashobh
In Chrome, go to options (Customize and Control, the 3 dots/bars at top right) ---> More Tools ---> save page as
在 Chrome 中,转到选项(自定义和控制,右上角的 3 个点/条)---> 更多工具 ---> 将页面另存为
save page as
filename : any_name.html
save as type : webpage complete.
Then you will get any_name.html
and any_name folder
.
然后你会得到any_name.html
和any_name folder
。
回答by RAN
Try Winhttrack
...offline browser utility.
It allows you to download a World Wide Web site from the Internet to a local directory, building recursively all directories, getting HTML, images, and other files from the server to your computer. HTTrack arranges the original site's relative link-structure. Simply open a page of the "mirrored" website in your browser, and you can browse the site from link to link, as if you were viewing it online. HTTrack can also update an existing mirrored site, and resume interrupted downloads. HTTrack is fully configurable, and has an integrated help system.
WinHTTrack is the Windows 2000/XP/Vista/Seven release of HTTrack, and WebHTTrack the Linux/Unix/BSD release...
...离线浏览器实用程序。
它允许您将万维网站点从 Internet 下载到本地目录,递归构建所有目录,从服务器获取 HTML、图像和其他文件到您的计算机。HTTrack 安排原始站点的相关链接结构。只需在浏览器中打开“镜像”网站的一个页面,您就可以从一个链接到另一个链接浏览该网站,就像您在网上查看一样。HTTrack 还可以更新现有的镜像站点,并恢复中断的下载。HTTrack 是完全可配置的,并具有集成的帮助系统。
WinHTTrack 是 Windows 2000/XP/Vista/Seven 的 HTTrack 版本,WebHTTrack 是 Linux/Unix/BSD 的版本...