爬取静态网页

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains website.org \
     --no-parent \
  www.baidu.com
www.baidu.com
同时指定了 --no-clobber 及 --convert-links 参数,将使用 --convert-links
--2022-08-23 14:46:40--  http://www.baidu.com/
正在连接 127.0.0.1:7890... 已连接。
已发出 Proxy 请求,正在等待回应... 200 OK
长度:2381 (2.3K) [text/html]
正在保存至: “www.baidu.com/index.html”

www.baidu.com/index.html                                                                   100%[========================================================================================================================================================================================================================================>]   2.33K  --.-KB/s  用时 0.005s

2022-08-23 14:46:40 (450 KB/s) - 已保存 “www.baidu.com/index.html” [2381/2381])

下载完毕 --2022-08-23 14:46:40--
总用时:0.4s
下载了:1 个文件,0.005s (450 KB/s) 中的 2.3K
正在转换 www.baidu.com/index.html 中的链接... 4.
0-4
已转换了 1 个文件中的链接,用时 0.001 秒。

安装 wget

$ brew install wget