湖中沉 发表于 2024-4-9 14:57:25

主流蜘蛛分析——Bytespider

Bytespider 这个爬虫是字节跳动旗下头条搜索的爬虫,其爬虫 UA 为:
#PC端
Mozilla/5.0 (compatible; Bytespider; https://zhanzhang toutiao com/)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.0.0 Safari/537.36

#Android端
Mozilla/5.0 (Linux; Android 5.0) AppleWebKit/537.36 (KHTML, like Gecko)
Mobile Safari/537.36 (compatible; Bytespider; https://zhanzhang toutiao com/)
#
iOS端
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

# robots.txt 屏蔽

Bytespider 遵守robots规则,可采用以下方法屏蔽:
User-agent: Bytespider
Disallow: /

头条搜索的站点配图一般是使用 og:image 标签(Open Graph Protocol Meta)来识别的,因此想要网页旁边出现漂亮合理的配图可在网页 <head></head> 中添加 Open Graph Protocol Meta 标签。


页: [1]
查看完整版本: 主流蜘蛛分析——Bytespider