一种通用数据采集的schema定义形式
{
"name": "凤凰金融",
"notice": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"comments": "网站通告"
},
"url": {
"data": "attribute",
"value": "http://www.fengjr.com/financing/list?type=cx"
"comments": "本平台数据的采集URL"
},
"project": {
"data": "url",
"url": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"template": ""
},
"title": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
},
"detail": {
"title": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
},
"amount": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
}
}
},
"member": {
"data": "sub_item",
"sub_item": {
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"src-save": 0,
"url": {
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"template": ""
}
},
"detail": {
"title": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
},
"amount": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
}
}
},
"src-save": 1
}
补充:
{
"name": "凤凰金融",
"notice": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
},
"url": {
"data": "attribute",
"value": "http://www.fengjr.com/financing/list?type=cx"
},
"project": {
"data": "url",
"url": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"template": ""
},
"title": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
},
"detail": {
"name": "网贷列表",
"title": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
},
"amount": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
}
}
},
"member": {
"data": "sub_item",
"sub_item": {
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"src-save": 0,
"url": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"template": ""
}
},
"detail": {
"name": "会员材料",
"title": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
},
"amount": {
"data": "attribute",
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
]
}
}
},
"src-save": 1,
"crawler": {
"handler":"httpClient|selenium",
"results":"html|json|text",
"next_page": {
"matcher": [
{
"match": "xpath",
"pattern": "//*[@id=\"page-financing\"]/div[1]/div[5]/div/div/div[3]"
}
],
"template": ""
},
"history": "re-crawl|skip|stop"
}
}
一种通用数据采集的schema定义形式的更多相关文章
- c语言的预处理指令分3种 1> 宏定义 2> 条件编译 3> 文件包含
宏简介 1.C语言在对源程序进行编译之前,会先对一些特殊的预处理指令作解释(比如之前使用的#include文件包含指令),产生一个新的源程序(这个过程称为编译预处理),之后再进行通常的编译 所有的预处 ...
- 精简Docker镜像的五种通用方法
http://dockone.io/article/8163 精简Docker镜像的好处很多,不仅可以节省存储空间和带宽,还能减少安全隐患.优化镜像大小的手段多种多样,因服务所使用的基础开发语言不同而 ...
- 使用 Json Schema 定义 API
本文地址:使用 Json Schema 定义 API 前面我们介绍了 Json Schema 的基本内容,这篇文章我们结合 jsonschema2pojo 工具深入分析如何使用 Json Schema ...
- #define宏定义形式的"函数"导致的bug
定义了一个宏定义形式的"函数": #define SUM8(YY)\ {\ int Y = YY>>2;\ ...\ } 然后使用的时候,传入了一个同名的变量Y: i ...
- 几种常用的JS类定义方法
几种常用的JS类定义方法 // 方法1 对象直接量var obj1 = { v1 : "", get_v1 : function() { return ...
- 代码片段--Makefile之大型工程项目子目录Makefile的一种通用写法
转载:http://blog.csdn.net/mo_hui123456/article/details/8929615 管理Linux环境下的C/C++大型项目,如果有一个智能的Build Syst ...
- 跟我一起学extjs5(16--各种Grid列的自己定义渲染)
跟我一起学extjs5(16--各种Grid列的自己定义渲染) Grid各列已经可以展示出来了.列的类型包含字符型,整型,浮点型,货币型,百分比型,日期型和布尔型,我自己定义了各种类型 ...
- thinkphp 的两种建构模式 第一种一个单入口里面定义两个模块,前台和后台,函数控制模块必须function.php前台加载前台模块的汉书配置文件,后台加载后台模块的汉书配置文件,公共文件共用。第二种架构模式两个单入口文件,分别生成两个应用定义define。。。函数可以定义配置文件。。。。
thinkphp 的两种建构模式 第一种一个单入口里面定义两个模块,前台和后台,函数控制模块必须function.php前台加载前台模块的汉书配置文件,后台加载后台模块的汉书配置文件,公共文件共用. ...
- Makefile之大型工程项目子目录Makefile的一种通用写法
管理Linux环境下的C/C++大型项目,如果有一个智能的Build System会起到事半功倍的效果,本文描述Linux环境下大型工程项目子目录Makefile的一种通用写法,使用该方法,当该子目录 ...
随机推荐
- c#中Lock(锁)的研究以及跨线程UI的操作
本文只针对C#中,多线程同步所用到的锁(lock)作为研究对象.由于想更直观的显示结果,所以,在做demo的时候,就把多线程通过事件操作UI的代码也写了出来,留作备忘和分享吧. 其实多线程 ...
- BZOJ_1601_[Usaco2008_Oct]_灌水_(最小生成树_Kruskal)
描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1601 有\(n\)个田地需要灌溉,每个田地可以自己引水,花费为\(w[i]\),或者连接其他被 ...
- MCI音乐播放
缘由: 在改正俄罗斯方块程序的功能的时候,想给这个程序增加一个背景音乐.本想用PlayWave来做的,但想到这个功能十分常用,那还不如封装一个自己的CMusic 类,以备不时之需.本来以为很容易的,可 ...
- Charles抓Https的包
1: 手机上打开这个地址, 安装文件. http://www.charlesproxy.com/getssl 2:保证手机与电脑在同一个网段 3:按住alt再点击wifi, 显示出当前电脑的ip地址. ...
- eclipse简单注释规范
设置注释模板的入口: Window->Preference->Java->Code Style->Code Template Types/*** @ClassName: ${t ...
- 【JS】Intermediate7:jQuery:DOM API
1.jQuery also makes performing actions on many elements at the same time simple 2.eg:$('.note').css( ...
- HW3.22
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.4
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- POJ1401 - Factorial
题目大意 N!末尾0的个数 题解 0只能由2*5产生,所以只要求2,5有多少对即可,又因为10!中5的个数少于2,所以只要求因子5有多少个即可,答案即为N/5+N/25+N/125.. 代码: #in ...
- Kooboo中主要的几个关键词中的关系
Kooboo中主要的几个关键词中的关系 Content Type //相当于数据库表 Content //相当于数据 View //部分View 她可以使用Content ...