用wget批量下载一些网页时遇到了一个问题。
命令:
for i in {1..254}
do wget "http://www.delorie.com/gnu/docs/gdb/gdb_${i}.html"
done错误: 403 Bulk download prohibited due to recursion abuse. 解决方法: 在$HOME下添加.wgetrc header = Accept-Language: en-us,en;q=0.5 header = Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 header = Connection: keep-alive user_agent = Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 referer = http://www.askapache.com/ robots = off 参考: http://www.askapache.com/linux/wget-header-trick.html -- 您收到此邮件是因为您订阅了 Google 网上论坛的“广州 GNU/Linux 用户组”论坛。 要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 [email protected]。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 通过以下网址访问此论坛:http://groups.google.com/group/gzlug。 要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
