1_Robots协议

Robots 协议

Robots Exclusion Standard 网络爬虫排除标准

作用:网站告知网络爬虫哪些页面可以抓取,哪些不行

形式:在网站根目录下的robots.txt文件

Robots 基本语法

# 注释 *代表所有 /代表根目录
User - agent : *
Disallow : /

类人类行为可不参考

案例

http://www.jd.com/robots.txt
http://news.sina.com.cn/robots.txt
http://www.qq.com/robots.txt
http://news.qq.com/robots.txt
http://www.mod.edu.cn/robots.txt(无robots协议)

猜你喜欢

转载自blog.csdn.net/qq_44105948/article/details/106272143