一种通用数据采集的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的一种通用写法,使用该方法,当该子目录 ...
随机推荐
- 【HDOJ】1857 Word Puzzle
trie树.以puzzle做trie树内存不够,从puzzle中直接找串应该会TLE.其实可以将查询组成trie树,离线做.扫描puzzle时注意仅三个方向即可. /* 1857 */ #includ ...
- 【HDOJ】1076 An Easy Task
水题,如题. #include <stdio.h> #define chk(Y) (Y%4==0 && Y%100!=0) || Y%400==0 int main() { ...
- write & read a sequence file(基于全新2.2.0API)
write & read a sequence file write & read a sequence file import java.io.IOException; import ...
- ORA-12545:Connect failed beacuse target host or object does not exist
更换计算机名,重新启动系统后 oracle 的监听器就无法正常启动, 总是提示ORA-12545:Connect failed beacuse target host or object does n ...
- com.google.common.eventbus.EventBus介绍
以下内容直接翻译了EventBus的注释: com.google.common.eventbus.EventBus介绍: 首先这个类是线程安全的, 分发事件到监听器,并提供相应的方式让监听器注册它们自 ...
- [HUST 1017] Exact cover
Exact cover Time Limit: 15s Memory Limit: 128MB Special Judge Submissions: 6012 Solved: 3185 DESCRIP ...
- SharePoint Srver 2010 资源汇总
转:http://bbs.winos.cn/thread-93681-1-1.html Microsoft SharePoint Server 2010 是适用于企业和网络的业务协作平台,可以帮助您通 ...
- FZU2090 旅行社的烦恼 巧妙floyd 最短路
分析:floyd看似很好理解,实际上是状态转移,具体的解释参照这里 http://www.cnblogs.com/chenying99/p/3932877.html 深入理解了floyd后,这个题就可 ...
- Visual Studio 2015 下载地址
Visual Studio 2015 发行说明: https://visualstudio.com/zh-cn/news/vs2015-vs.aspx Visual Studio 2015 特性简 ...
- Linux查看系统版本信息的
// 显示电脑以及操作系统的相关信息 uname -a // 正在运行的内核版本 cat /proc/version // 显示的是发行版本信息 cat /etc/issue // 适用于所有的lin ...