LOGO OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 开发文档 其他文档  
 
网站管理员

[点晴永久免费OA]百度/360/头条/搜狗/bing/Google搜索引擎用到的网络爬虫介绍与识别

admin
2024年4月11日 10:24 本文热度 101

网络爬虫是一种自动化程序,可以按照一定的规则和算法在互联网上抓取网页信息。爬虫通过访问网页的超链接、解析页面内容等方式,收集网页数据并存储在本地或数据库中。爬虫的主要功能包括发现新网页、下载网页内容、解析网页结构、提取有用信息等。

然而爬虫访问网站可能会占用服务器资源,浪费流量,甚至可能造成服务器宕机,为了应对这些问题,识别爬虫并进行拦截屏蔽是至关重要的。

一种常见的识别爬虫的方法是通过User Agent(简称 UA),即用户代理,这是一个特殊的字符串头,使服务器能够识别客户端的操作系统、浏览器等信息。不同的爬虫有不同的User Agent,比如百度蜘蛛(Baiduspider)、360蜘蛛(360 Spider)、头条搜索蜘蛛(Bytespider)等,不同的爬虫通常会有其独特的User Agent标识,通过识别这些标识,网站管理员可以初步判断来访者是否为爬虫,并据此采取相应的拦截措施。

以下国内外常见的UA特征:

国内

    Baiduspider

Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html

Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;) AppleWebKit/534.46 (KHTML,like Gecko)  Version/5.1 Mobile Safari/10600.6.3 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)


360Spider

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36; 360Spider

以下为360搜索的蜘蛛IP段:   180.153.232.*    180.153.234.*    180.153.236.*    180.163.220.*    42.236.101.*    42.236.102.*    42.236.103.*    42.236.10.*    42.236.12.*    42.236.13.*    42.236.14.*    42.236.15.*    42.236.16.*    42.236.17.*    42.236.46.*    42.236.48.*    42.236.49.*    42.236.50.*    42.236.51.*    42.236.52.*    42.236.53.*    42.236.54.*    42.236.55.*    42.236.99.*


    Bytespider   头条搜索(字节跳动)

Mozilla/5.0 (compatible; Bytespider; https://zhanzhang.toutiao.com/) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.0.0 Safari/537.36

Mozilla/5.0 (Linux; Android 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; Bytespider; https://zhanzhang.toutiao.com/)

Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.36 (KHTML, like Gecko) Version/7.0 Mobile Safari/537.36 (compatible; Bytespider; https://zhanzhang.toutiao.com/)

头条搜索ip字段介绍

头条搜索的ip字段总共涉及10个ip,具体字段如下:

  • 110.249.201.0/24

  • 110.249.202.0/24

  • 111.225.148.0/24

  • 111.225.149.0/24

  • 220.243.135.0/24

  • 220.243.136.0/24

  • 220.243.188.0/24

  • 220.243.189.0/24

  • 60.8.123.0/24

  • 60.8.151.0/24

sougou spider

sogou spider User-Agent字段:

Sogou web spider 和 Sogou inst spider


国外

bingbot

Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/

Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)W.X.Y.Z Safari/537.36

Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36  (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)


Googlebot

   

 [Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)            

     

YanDexBot

Mozilla/5.0 (compatible; YandexAccessibilityBot/3.0; +http://yandex.com/bots)

Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)

除了User Agent外,还有robots协议,即爬虫协议,网站可以通过robots.txt文件告诉搜索引擎哪些页面可以抓取,哪些页面不能抓取。正常搜索引擎均遵守robots协议,但是,这个robots协议不是防火墙,也没有强制执行力强制执行力,恶意搜索引擎完全可以忽视robots.txt文件去抓取网页的快照。因此,我们不能仅仅依赖robots.txt来保护网站资源安全。相反,我们应该采取多种手段相结合的策略,包括识别User Agent、分析IP地址、监控爬虫行为等,以实现对恶意爬虫的有效拦截。

参考链接:

https://help.baidu.com/question?prod_id=99&class=0&id=3001

https://zhanzhang.toutiao.com/page/outer/docs/26899

http://www.so.com/help/spider_ip.html

https://help.sogou.com/guide.html

http://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0

https://www.pdflibr.com/crawler/googlebot

https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.html


该文章在 2024/4/11 10:25:00 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2024 ClickSun All Rights Reserved