【发布时间】:2017-06-17 22:43:06
【问题描述】:
我正在尝试将所有 HTML 文件从 https://www.workandincome.govt.nz/map/ 下载到磁盘。我的意思是我需要在以“map”结尾的https://www.workandincome.govt.nz/map/ URL 之后获取 index.html 和所有其他 HTML 文件。比如我需要下载:
https://www.workandincome.govt.nz/map/income-support/extra-help/disability-allowance/medical-fees-01.html
https://www.workandincome.govt.nz/map/income -support/extra-help/community-costs/index.html
等等。我不需要从 map 不在 URL 中的同一站点下载任何其他 HTML 页面。我试过下面的 wget 命令:
wget --limit-rate=200k --recursive --html-extension --convert-links --random-wait --follow-tags=a -U "Mozilla/5.0 (X11; Linux x86_64)" https://www.workandincome.govt.nz/map/index.html
通过上面我得到https://www.workandincome.govt.nz/map/index.html 然后 http://www.workandincome.govt.nz/robots.txt 然后是我不需要的 HTML 文件,例如:
www.workandincome.govt.nz/online-services/index.html, www.workandincome.govt.nz/eligibility/index.html
有人可以查看我正在使用的 wget 命令和建议吗? 谢谢
【问题讨论】: