Mirror a site by using wget

抓取整个站点:

1
wget -m -r -p -np -k -E 'https://example.com'
1
2
3
4
-r # 递归抓取
-k # 修复绝对链接为相对链接,适合本地浏览
-m # 镜像
-E # 将 MIME TYPE 为 `text/html` 的文档用 `.html` 扩展名保存
1
-e robots=off # 忽略 robots.txt 进行抓取,请注意这样使用可能违法