【问题标题】:How to download entire front-end of a website [closed]如何下载网站的整个前端[关闭]
【发布时间】:2015-09-24 07:44:38
【问题描述】:

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

【问题讨论】:

    标签: html web


    【解决方案1】:

    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
    

    【讨论】:

    • 哇 linux 太酷了!问题是我是菜鸟,仍然使用 Windows。任何适用于 Windows 的 chrome 扩展程序或软件?
    • 哦,我找到了在 Windows 上使用 wget 的方法! builtvisible.com/download-your-website-with-wget
    • 如果您不介意,我还有一个问题。如果我可以像这样下载整个网站,人们如何保护“付费模板”,因为他们中的许多人都提供演示,即实时网站。我可以简单地使用 wget 下载它而无需支付一毛钱。这里有什么问题?
    • 他们的演示背后有数据库吗?是否有一个应用程序层正在做一些事情来呈现您所看到的 html?这将提取用于在浏览器中渲染的内容,而不是深入到 borg 集体并窃取他们所有的秘密。
    • 如果这对您有用,请标记为已接受。让其他人更容易找到有用的答案。
    【解决方案2】:

    右键单击>将页面另存为

    将下载所有的 css 和 js/html。

    【讨论】:

    • 这只会下载一页。提问者想要下载整个网站。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-31
    相关资源
    最近更新 更多