爬虫基础 - Robots协议
Robots协议
指定一个robots.txt文件,告诉爬虫引擎怎么爬取
https://www.taobao.com/robots.txt
User-agent: Baiduspider
Allow: /article
Allow: /oshtml
Allow: /ershou
Allow: /$
Disallow: /product/
Disallow: / User-Agent: Googlebot
Allow: /article
Allow: /oshtml
Allow: /product
Allow: /spu
Allow: /dianpu
Allow: /oversea
Allow: /list
Allow: /ershou
Allow: /$
Disallow: / User-agent: Bingbot
Allow: /article
Allow: /oshtml
Allow: /product
Allow: /spu
Allow: /dianpu
Allow: /oversea
Allow: /list
Allow: /ershou
Allow: /$
Disallow: / User-Agent: 360Spider
Allow: /article
Allow: /oshtml
Allow: /ershou
Disallow: / User-Agent: Yisouspider
Allow: /article
Allow: /oshtml
Allow: /ershou
Disallow: / User-Agent: Sogouspider
Allow: /article
Allow: /oshtml
Allow: /product
Allow: /ershou
Disallow: / User-Agent: Yahoo! Slurp
Allow: /product
Allow: /spu
Allow: /dianpu
Allow: /oversea
Allow: /list
Allow: /ershou
Allow: /$
Disallow: / User-Agent: *
Disallow: /
其他爬虫,不允许爬取
User-Agent: *
DisalloW: /
这是一个君子协定,'爬亦有道'
这个协议为了让搜索引擎更有效搜索自己的内容
爬虫基础 - Robots协议的更多相关文章
- 爬虫基础---HTTP协议理解、网页的基础知识、爬虫的基本原理
一.HTTP协议的理解 URL和URI 在学习HTTP之前我们需要了解一下URL.URI(精确的说明某资源的位置以及如果去访问它) URL:Universal Resource Locator 统一资 ...
- python爬虫基础01-HTTP协议
深入浅出了解HTTP协议 HTTP(HyperText Transfer Protocol,超文本传输协议)是互联网上应用最为广泛的一种网络协议.目前使用最普遍的一个版本是HTTP 1.1. HTTP ...
- Robots协议(爬虫协议、机器人协议)
Robots协议(也称为爬虫协议.机器人协议等)的全称是“网络爬虫排除标准”(Robots Exclusion Protocol),网站通过Robots协议告诉搜索引擎哪些页面可以抓取,哪些页面不能抓 ...
- [python爬虫]Requests-BeautifulSoup-Re库方案--robots协议与Requests库实战
[根据北京理工大学嵩天老师“Python网络爬虫与信息提取”慕课课程编写 慕课链接:https://www.icourse163.org/learn/BIT-1001870001?tid=100223 ...
- Python 爬虫-Robots协议
2017-07-25 21:08:16 一.网络爬虫的规模 二.网络爬虫的限制 • 来源审查:判断User‐Agent进行限制 检查来访HTTP协议头的User‐Agent域,只响应浏览器或友好爬虫的 ...
- 2.爬虫 urlib库讲解 异常处理、URL解析、分析Robots协议
1.异常处理 URLError类来自urllib库的error模块,它继承自OSError类,是error异常模块的基类,由request模块产生的异常都可以通过这个类来处理. from urllib ...
- [Python3网络爬虫开发实战] 3.1.4-分析Robots协议
利用urllib的robotparser模块,我们可以实现网站Robots协议的分析.本节中,我们来简单了解一下该模块的用法. 1. Robots协议 Robots协议也称作爬虫协议.机器人协议,它的 ...
- 网络爬虫 robots协议 robots.txt
网络爬虫 网络爬虫是一个自动提取网页的程序,它为搜索引擎从万维网上下载网页,是搜索引擎的重要组成.传统爬虫从一个或若干初始网页的URL开始,获得初始网页上的URL,在抓取网页的过程中,不断从当前页面上 ...
- 爬虫的盗亦有道Robots协议
爬虫的规定 Robots协议 网站开发者对于网络爬虫的规范的公告,你可以不遵守可能存在法律风险,但尽量去遵守 Robots协议:在网页的根目录+robots.txt Robots协议的基本语法: #注 ...
随机推荐
- centos7下配置免密码登录
主机master ,slaver1,slaver2 1.每台主机都执行 ssh-keygen -t rsa 然后一直回车 2.操作master.master生成公钥 放入authorized_keys ...
- 我的javascript心跳机
li { list-style: none!important; padding:0; } .list_num{ list-style-type:decimal; } .list_inline{ ma ...
- redisTools-IdGenerator
public class IdGenerator : RedisToolBase { //redis客户端对象 private static readonly NedisClient client = ...
- 从头认识java-16.5 nio的数据转换
这一章节我们来讨论一些nio的数据转换. 上面一章节我们提到ByteBuffer,可是他是面向二进制数据,对于编程来说不是非常方便,因此,java添加了转换数据的工具. 1.asCharBuffer ...
- shell基础(六)--字符串和数组
对文本处理,单独用shell来处理还是比较薄弱.所以shell就引用了awk and sed这两个命令.我们今天不说这个 一 字符串 字符串是shell编程中最常用最有用的数据类型,因为你定义一个变 ...
- /etc/docker/key.json
/etc/docker/key.json 描述信息: This is the dockerd key for TLS connections.in web format, that docker us ...
- ssh通过密钥进行连接
sshd服务提供两种安全验证的方法: 基于口令的安全验证:经过验证帐号与密码即可登陆到远程主机. 基于密钥的安全验证:需要在本地生成"密钥对"后将公钥传送至服务端,进行公共密钥的比 ...
- Spring事务核心接口
- c#截取图片
简单的保存数据流 <input name="upImg" style="width: 350px; height: 25px;" size="3 ...
- LeetCode——Sqrt(x)
Description: Implement int sqrt(int x). Compute and return the square root of x. 好好学习数学还是非常有用的,牛顿迭代法 ...