如果想用wget来抓网页或者镜像站点但是遇到 robot.txt 不允许怎么办?比如这样的 robot.txt
1 2 3 4 | User-agent: * Disallow: /snapshots/ Disallow: /cgi-bin/ Disallow: /cgi2-bin/ |
在 $HOME/.wgetrc 中加入
1 | robots = off |
一切OK,镜像sina?
1 | wget -c -m -p -q -b http://www.sina.com |
-c 是继续传送, -m 是镜像, -p 是下载媒体文件,比如图片, -q 是安静模式, -b 是后台运行
Recent Comments