mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-23 04:34:22 +08:00
291 lines
8.8 KiB
JSON
291 lines
8.8 KiB
JSON
{
|
|
"id": 50,
|
|
"name": "任意代码条件判",
|
|
"url": "https://www.jd.com",
|
|
"links": "https://www.jd.com",
|
|
"containJudge": true,
|
|
"desc": "https://www.jd.com",
|
|
"inputParameters": [
|
|
{
|
|
"id": 0,
|
|
"name": "urlList_0",
|
|
"nodeId": 1,
|
|
"nodeName": "打开网页",
|
|
"value": "https://www.jd.com",
|
|
"desc": "要采集的网址列表,多行以\\n分开",
|
|
"type": "string",
|
|
"exampleValue": "https://www.jd.com"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"name": "loopText_1",
|
|
"nodeId": 2,
|
|
"nodeName": "循环",
|
|
"desc": "要输入的文本/网址,多行以\\n分开",
|
|
"type": "string",
|
|
"exampleValue": "",
|
|
"value": ""
|
|
}
|
|
],
|
|
"outputParameters": [
|
|
{
|
|
"id": 0,
|
|
"name": "参数1_文本",
|
|
"desc": "",
|
|
"type": "string",
|
|
"exampleValue": "/手机/数码"
|
|
}
|
|
],
|
|
"graph": [
|
|
{
|
|
"index": 0,
|
|
"id": 0,
|
|
"parentId": 0,
|
|
"type": -1,
|
|
"option": 0,
|
|
"title": "root",
|
|
"sequence": [
|
|
1,
|
|
2
|
|
],
|
|
"parameters": {
|
|
"history": 1,
|
|
"tabIndex": 0,
|
|
"useLoop": false,
|
|
"xpath": "",
|
|
"wait": 0
|
|
},
|
|
"isInLoop": false
|
|
},
|
|
{
|
|
"id": 1,
|
|
"index": 1,
|
|
"parentId": 0,
|
|
"type": 0,
|
|
"option": 1,
|
|
"title": "打开网页",
|
|
"sequence": [],
|
|
"isInLoop": false,
|
|
"position": 0,
|
|
"parameters": {
|
|
"useLoop": false,
|
|
"xpath": "",
|
|
"wait": 0,
|
|
"beforeJS": "",
|
|
"beforeJSWaitTime": 0,
|
|
"afterJS": "",
|
|
"afterJSWaitTime": 0,
|
|
"url": "https://www.jd.com",
|
|
"links": "https://www.jd.com",
|
|
"scrollType": 0,
|
|
"scrollCount": 0
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"index": 2,
|
|
"parentId": 0,
|
|
"type": 1,
|
|
"option": 8,
|
|
"title": "循环",
|
|
"sequence": [
|
|
4
|
|
],
|
|
"isInLoop": false,
|
|
"position": 1,
|
|
"parameters": {
|
|
"history": 4,
|
|
"tabIndex": -1,
|
|
"useLoop": false,
|
|
"xpath": "/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div",
|
|
"wait": 3,
|
|
"beforeJS": "",
|
|
"beforeJSWaitTime": 0,
|
|
"afterJS": "",
|
|
"afterJSWaitTime": 0,
|
|
"scrollType": 0,
|
|
"scrollCount": 0,
|
|
"loopType": "5",
|
|
"pathList": "",
|
|
"textList": "",
|
|
"code": "return document.body.scrollWidth > 1000",
|
|
"waitTime": 4,
|
|
"exitCount": 0,
|
|
"historyWait": 2
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"index": 3,
|
|
"parentId": 4,
|
|
"type": 0,
|
|
"option": 3,
|
|
"title": "提取数据",
|
|
"sequence": [],
|
|
"isInLoop": true,
|
|
"position": 0,
|
|
"parameters": {
|
|
"history": 4,
|
|
"tabIndex": -1,
|
|
"useLoop": false,
|
|
"xpath": "",
|
|
"wait": 0,
|
|
"beforeJS": "",
|
|
"beforeJSWaitTime": 0,
|
|
"afterJS": "",
|
|
"afterJSWaitTime": 0,
|
|
"paras": [
|
|
{
|
|
"nodeType": 0,
|
|
"contentType": 0,
|
|
"relative": true,
|
|
"name": "参数1_文本",
|
|
"desc": "",
|
|
"extractType": 0,
|
|
"relativeXpath": "",
|
|
"exampleValues": [
|
|
{
|
|
"num": 0,
|
|
"value": "/手机/数码"
|
|
},
|
|
{
|
|
"num": 1,
|
|
"value": "/家用电器"
|
|
},
|
|
{
|
|
"num": 2,
|
|
"value": "/电脑/办公"
|
|
},
|
|
{
|
|
"num": 3,
|
|
"value": "/家纺/家居/厨具"
|
|
},
|
|
{
|
|
"num": 4,
|
|
"value": "/家具/家装/灯具/工业品"
|
|
},
|
|
{
|
|
"num": 5,
|
|
"value": "/内衣/男装/女装/童装"
|
|
},
|
|
{
|
|
"num": 6,
|
|
"value": "/箱包/钟表/珠宝/女鞋"
|
|
},
|
|
{
|
|
"num": 7,
|
|
"value": "/运动/户外/男鞋"
|
|
},
|
|
{
|
|
"num": 8,
|
|
"value": "/汽车用品/车载电器"
|
|
},
|
|
{
|
|
"num": 9,
|
|
"value": "/母婴/洗护喂养"
|
|
},
|
|
{
|
|
"num": 10,
|
|
"value": "/玩具乐器/宠物生活"
|
|
},
|
|
{
|
|
"num": 11,
|
|
"value": "/家庭清洁/个人护理/计生情趣"
|
|
},
|
|
{
|
|
"num": 12,
|
|
"value": "/图书/童书/文学"
|
|
}
|
|
],
|
|
"default": "",
|
|
"beforeJS": "",
|
|
"beforeJSWaitTime": 0,
|
|
"JS": "",
|
|
"JSWaitTime": 0,
|
|
"afterJS": "",
|
|
"afterJSWaitTime": 0
|
|
}
|
|
],
|
|
"loopType": 1
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"index": 4,
|
|
"parentId": 2,
|
|
"type": 2,
|
|
"option": 9,
|
|
"title": "判断条件",
|
|
"sequence": [
|
|
5
|
|
],
|
|
"isInLoop": true,
|
|
"position": 0,
|
|
"parameters": {
|
|
"history": 1,
|
|
"tabIndex": 0,
|
|
"useLoop": false,
|
|
"xpath": "",
|
|
"wait": 0,
|
|
"beforeJS": "",
|
|
"beforeJSWaitTime": 0,
|
|
"afterJS": "",
|
|
"afterJSWaitTime": 0
|
|
}
|
|
},
|
|
{
|
|
"id": 4,
|
|
"parentId": 3,
|
|
"index": 5,
|
|
"type": 3,
|
|
"option": 10,
|
|
"title": "条件分支",
|
|
"sequence": [
|
|
3
|
|
],
|
|
"isInLoop": true,
|
|
"parameters": {
|
|
"history": 1,
|
|
"tabIndex": 0,
|
|
"useLoop": false,
|
|
"xpath": "",
|
|
"wait": 0,
|
|
"beforeJS": "",
|
|
"beforeJSWaitTime": 0,
|
|
"afterJS": "",
|
|
"afterJSWaitTime": 0,
|
|
"class": "5",
|
|
"value": "",
|
|
"code": "return document.body.scrollheight > 500",
|
|
"waitTime": 5
|
|
},
|
|
"position": 0
|
|
},
|
|
{
|
|
"id": -1,
|
|
"parentId": 3,
|
|
"index": 6,
|
|
"type": 3,
|
|
"option": 10,
|
|
"title": "条件分支",
|
|
"sequence": [],
|
|
"isInLoop": true,
|
|
"parameters": {
|
|
"history": 1,
|
|
"tabIndex": 0,
|
|
"useLoop": false,
|
|
"xpath": "",
|
|
"wait": 0,
|
|
"beforeJS": "",
|
|
"beforeJSWaitTime": 0,
|
|
"afterJS": "",
|
|
"afterJSWaitTime": 0,
|
|
"class": 0,
|
|
"value": "",
|
|
"code": "",
|
|
"waitTime": 0
|
|
},
|
|
"position": 1
|
|
}
|
|
]
|
|
} |