百度移动UA升级与PC端统一

近日百度站长平台发布公告称:Baiduspider针对移动抓取user agent(以下简称ua)进行了升级,与PC端的抓取ua做到版本统一,均称为Baiduspider/2.0。移动ua和pc ua详情如下:

新版移动UA:文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;)文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

AppleWebKit/534.46 (KHTML,like Gecko) Version/5.1 Mobile Safari/10600.6.3文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

(compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

PC UA:文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

UA升级后,之前通过“+http://www.baidu.com/search/spider.html”进行识别的网站请注意!您需要修改识别方式,新的正确的识别Baiduspider移动ua的方法如下:文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

1. 通过关键词“Android”或者“Mobile”来进行识别,判断为移动访问或者抓取。文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

2. 通过关键词“Baiduspider/2.0”,判断为百度爬虫。文章源自堕落的鱼-https://www.duoluodeyu.com/1394.html

另外站长需要注意,对于robots封禁,如果封禁的agent是Baiduspider,会对PC和移动同时生效。即,无论是PC还是移动Baiduspider,都不会对封禁对象进行抓取。之所以要强调这一点,是发现有些代码适配站点(同一个url,PC ua打开的时候是PC页,移动ua打开的时候是移动页),想通过设置robots的agent封禁达到只让移动Baiduspider抓取的目的,但由于PC和移动Baiduspider的agent都是Baiduspider,这种方法是非常不可取的。

 最后更新:2015-5-31
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证