小爬虫--支持Robots.txt过滤介绍

 
 
什么是robots协议?
    robots.txt(统一小写)是一种存放于网站根目录下的ASCII编码的文本文件。
比如 http://www.sitemap-xml.org/robots.txt
    大多数主流搜索引擎支持robots协议,它通常告诉搜索引擎,此网站中的哪些内容是不能抓取的,哪些是可以被抓取的。
小爬虫支持的robots.txt内容范例:
拦截所有的页面的抓取
User-agent: *
Disallow: /
禁止小爬虫访问特定目录
User-agent: *
Disallow: /test/
Disallow: /images/
Disallow: /tmp/
禁止小爬虫访问特定目录 及某些指定页面
User-agent: *
Disallow: /test/
Disallow: /images/
Disallow: /noused.html
Disallow: /us/private2.html
 
以上立即下载小爬虫本地安装版

 

 

 

 

版权所有 2008 小爬虫     收藏本站  什么是网站地图?  什么是sitemap.xml?   关于小爬虫 首页