某些服务器具有robots.txt文件,以阻止网络抓取工具抓取其网站 . 有没有办法让网络抓取工具忽略robots.txt文件?我正在使用Mechanize for python .
机械化的documentation有以下示例代码:
br = mechanize.Browser() .... # Ignore robots.txt. Do not do this without thought and consideration. br.set_handle_robots(False)
这正是你想要的 .
This看起来像你需要的:
from mechanize import Browser br = Browser() # Ignore robots.txt br.set_handle_robots( False )
但你知道你在做什么......
2 回答
机械化的documentation有以下示例代码:
这正是你想要的 .
This看起来像你需要的:
但你知道你在做什么......