gpt4 book ai didi

html - 如何下载网站的整个前端

转载 作者:行者123 更新时间:2023-12-05 00:51:22 24 4
gpt4 key购买 nike

关闭。这个问题需要debugging details .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

6年前关闭。




Improve this question




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

最佳答案

wget是你的 friend ,它适用于 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

关于html - 如何下载网站的整个前端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32750276/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com