常见互联网蜘蛛和垃圾爬虫的屏蔽
  2022/11/30 2:00:06
关键词:蜘蛛 爬虫 Spider robot 
  常见搜索爬虫
1、Googlebot
Googlebot 是 谷歌 的网络爬虫,其UA标识为 “(compatible; Googlebot /2.1; +http://www.google.com/bot.html)”。对大部分网站,Googlebot应该是爬取最勤快的爬虫,能给优质博客带来大量流量。
除了爬取网页的Googlebot,常见的还有图片爬虫Googlebot-Image、移动广告爬虫Mediapartners-Google等。

2、Baiduspider
Baiduspider 是 百度 的网页爬虫(蜘蛛),中文站很常见。其UA标识为“(compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)”。
除了网页爬虫,手机百度爬虫Baiduboxapp、渲染抓取Baiduspider-render等。

3、bingbot
bingbot 是微软 bing搜索 的爬虫,其UA标识为“(compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)”。
自微软推广bing搜索品牌后,微软原来的爬虫MSNBot越来越少见到了。

4、360Spider
360Spider 是 360搜索 的爬虫,其UA标识为“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/5 37.36; 360Spider”。
360搜索份额较少,这个爬虫不是很常见。

5、Sogou web spider
Sogou web spider 是 搜狗搜索 的网页爬虫,其UA标识为“Sogou web spider/4.0(+http://www.sogou.com/docs/help/ webmasters.htm#07)”。背靠腾讯,搜狗目前市场份额在上升,因此其网络爬虫比较勤快,经常能看到。
访问日志搜索Sogou,除了Sogou web spider,还常见SogouMSE、SogouMobileBrowser。这是搜狗手机浏览器的UA标识,不是爬虫。

6、YisouSpider
YisouSpider 是 神马搜索 的爬虫,UA标识是“Mozilla/5.0 (Windows NT 6.1; Win64 ; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 YisouSpider/5.0 Safari/537.36”。
神马曾经或不时疯狂抓取网页导致一些小网站崩溃而惹的天怒人怨。神马搜索是UC合并到阿里后推出的移动搜索引擎。

7、YandexBot
YandexBot 是俄罗斯最大搜索引擎和互联网巨头 Yandex 的网页爬虫,其UA标识是“(compatible; YandexBot/3.0; +http://yandex.com/bots)”。
Yandex提供中文界面和中文搜索,也是少数目前能直接打开的国外搜索引擎。随着越来越多中国人知道Yandex,YandexBot在中文网站日志里越来越常见。

8、DuckDuckGo
DuckDuckGo 是 DuckDuckGo 的网页爬虫,其UA标识是“Mozilla/5.0 (Linux; Android 10) AppleWebK it/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36 DuckDuckGo/5”。
DuckDuckGo 主打隐私、安全、不监控用户记录,界面简洁,也提供中文搜索界面。

垃圾爬虫
1、MJ12Bot
MJ12Bot 是英国著名SEO公司Majestic的网络爬虫,其抓取网页给需要做SEO的人用,不会给网站带来流量。

2、AhrefsBot
AhrefsBot 是知名SEO公司Ahrefs的网页爬虫。其同样抓取网页给SEO专业人士用,不会给网站带来流量。

3、SEMrushBot
SEMrushBot 也是SEO、营销公司的网络爬虫。

DotBot
DotBot 是 Moz.com 的网页爬虫,抓取数据用来支持 Moz tools 等工具。

4、MauiBot
MauiBot 不同于其他爬虫,这个爬虫连网站都没有,UA只显示一个邮箱:”MauiBot (crawler.feedback+wc@gm ail.com)“。神奇的是这个看起来是个人爬虫,竟然遵循robots协议,算得上垃圾爬虫的一股清流。

屏蔽垃圾爬虫
屏蔽垃圾爬虫主要从两方面入手:1. robots.txt禁止;2. web层面通过UA禁止。下面分别做介绍。

1、robots.txt禁止
上文列出的垃圾爬虫都遵循robots协议,因此可以通过robots.txt禁止。操作是在网站根目录新增robots.txt文件,新增如下内容:

User-agent:*
Disallow:/download.php
User-Agent: AhrefsBot
Disallow: /
User-Agent: MJ12bot
Disallow: /
User-Agent: DotBot
Disallow: /
User-Agent: SemrushBot
Disallow: /
User-Agent: MauiBot
Disallow: /

2、通过web软件屏蔽
对于不遵循robots协议的爬虫,可以在web软件层面通过UA屏蔽。下面以 Nginx 为例介绍,操作为:在网站配置的server段内,新增类似如下指令:

server {
... 一些网站配置
# 屏蔽curl/httpclient抓取
if ($http_user_agent ~* curl|httpclient) {
   return 403;
}
# 屏蔽MauiBot等爬虫
if ($http_user_agent ~* MauiBot|AhrefsBot|DotBot) {
   return 403;
}
... 其他配置
 [1] [2] [3]

相关文章(向右看)..

·相关
chatgpt为何如此火爆,它真
常见互联网蜘蛛和垃圾爬虫的屏蔽/图
如何判定真假蜘蛛的IP段?
新西兰造出喷射背包 圆常人飞天梦/图


·热点