Windows下wget使用
1.0 wget下载链接 https://eternallybored.org/misc/wget/
下载wget压缩包.zip,在环境变量Path中配置wget所解压的位置


2.0 wget使用(以clone裁判文书网为例)
2.1 WIN+R,输入cmd打开命令行
2.1.1 下载裁判文书网首页所用到的资源
wget --mirror --page-requisites --adjust-extension --no-parent --convert-link http://wenshu.court.gov.cn/Index
如果报参数错误,显示没有-E, --adjust-extension,请更新wget版本
2.1.2 启动本地服务器
python -m http.server [PortNumber]
注意:启动的服务器根目录是在cmd中执行这条命令时的路径,下图的根目录为C:\Windows\systems32\cmd.exe

本文介绍了如何在Windows环境中利用wget工具下载整个网站镜像,并通过Python内置的http.server模块搭建本地服务器进行访问。具体步骤包括下载wget软件,使用wget的--mirror等参数克隆裁判文书网,以及启动本地HTTP服务器,通过http://localhost:PortNumber访问下载的内容。

457

被折叠的 条评论
为什么被折叠?



