有时候大猪就想把一个网站的API拉下来学习下下,但是那个网站太卡,每次都不敢刷新,还好,现在有了它,想什么学习都没问题了。
使用
wget -c -r -npH -k https://reactjs.com
然后巴拉巴拉下载
--2017-11-14 17:58:12-- http://www.jianshu.com/
Resolving www.jianshu.com... 112.51.126.25
Connecting to www.jianshu.com|112.51.126.25|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'index.html'
index.html [ <=> ] 56.23K 354KB/s in 0.2s
2017-11-14 17:58:13 (354 KB/s) - 'index.html' saved [57578]
Loading robots.txt; please ignore errors.
--2017-11-14 17:58:13-- http://www.jianshu.com/robots.txt
Reusing existing connection to www.jianshu.com:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: 'robots.txt'
参数
-c 断点续传
-r 递归下载
-np 递归下载时不搜索上层目录
-nd 递归下载时不创建一层一层的目录,把所有文件下载当前文件夹中
-p 下载网页所需要的所有文件(图片,样式,js文件等)
-H 当递归时是转到外部主机下载图片或链接
-k 将绝对链接转换为相对链接,这样就可以在本地脱机浏览网页了
