From 42db55deb8e4385f26c44d2f4a64bee321ed2721 Mon Sep 17 00:00:00 2001 From: naibo Date: Sat, 20 May 2023 20:44:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=8B=E8=BD=BD=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectronJS/.gitignore | 4 + ElectronJS/EasySpider_en.crx | Bin 202516 -> 202517 bytes ElectronJS/EasySpider_zh.crx | Bin 202517 -> 202518 bytes ElectronJS/src/taskGrid/FlowChart_CN.html | 11 +- ElectronJS/src/taskGrid/logic_CN.js | 1 + ElectronJS/tasks/57.json | 335 ++++++++++++++++++ ElectronJS/tasks/58.json | 1 + ElectronJS/tasks/59.json | 1 + ExecuteStage/.gitignore | 3 +- ExecuteStage/.vscode/launch.json | 2 +- ExecuteStage/easyspider_executestage.py | 314 ++++++++-------- Extension/manifest_v3/.gitignore | 2 + Extension/manifest_v3/EasySpider_en.crx | Bin 202516 -> 202517 bytes Extension/manifest_v3/EasySpider_zh.crx | Bin 202517 -> 202518 bytes Extension/manifest_v3/src/manifest.json | 2 +- .../V0.3.0 New Features.txt | 48 +++ Releases/EasySpider_windows_amd64/config.json | 2 +- .../execution_instances/0.json | 1 + .../execution_instances/1.json | 1 + .../execution_instances/2.json | 1 + .../execution_instances/3.json | 1 + .../execution_instances/4.json | 1 + .../EasySpider_windows_amd64/tasks/49.json | 1 + 23 files changed, 579 insertions(+), 153 deletions(-) create mode 100644 ElectronJS/tasks/57.json create mode 100644 ElectronJS/tasks/58.json create mode 100644 ElectronJS/tasks/59.json create mode 100644 Releases/EasySpider_windows_amd64/V0.3.0 New Features.txt create mode 100644 Releases/EasySpider_windows_amd64/execution_instances/0.json create mode 100644 Releases/EasySpider_windows_amd64/execution_instances/1.json create mode 100644 Releases/EasySpider_windows_amd64/execution_instances/2.json create mode 100644 Releases/EasySpider_windows_amd64/execution_instances/3.json create mode 100644 Releases/EasySpider_windows_amd64/execution_instances/4.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/49.json diff --git a/ElectronJS/.gitignore b/ElectronJS/.gitignore index 706816f..5344a55 100644 --- a/ElectronJS/.gitignore +++ b/ElectronJS/.gitignore @@ -10,3 +10,7 @@ user_data/ Data/ Chrome/ execution_instances/* +EasySpider_en.crx +EasySpider_zh.crx +.DS_Store +npminstall-debug.log diff --git a/ElectronJS/EasySpider_en.crx b/ElectronJS/EasySpider_en.crx index 1a914783d16b438f1c95ac1aa1289b64de3af2d0..2410867da0e7a6b935e64a5a7bfab439d652204c 100644 GIT binary patch delta 1767 zcmY+?dpOez9{})eKW2^1Z9`0Qi^^q^JH0|=3Msc34%&H%GGuaF3(37n%uyE2{p7Zx zVv}5Qq`8DFNu0t-dzp?)uJ38@bI$X;e|yqY42+HVN~#N7e#7)NX}|@HcvHdi>@WF z?+_C-1NrE~iNDo`NNO498T#t#!`nJ0GCNACMuJL`@6X>X7fI}O&_QR5Sq8Vlq z>XFXqh%l(!Yjg3iB;)R@6EAapU({Cy)@qRI&1lZ=iHOr>NvUvnqsbgiJ320J`jolX z;S_h9>kpzo%a!1B9bPUJ;2+Hfi{7~=<9haDWI%T1>XGGdad=tQdEcs@blTU4LvQnm zp>4FTbi}8aSj=`-h!R-mf{FZXxa6@ndSQ;ZD4R@T9X4f-O)ezlMd0n`^Y7|{?RQ01 zcdX;wk!tMe*v24z^`R3_bMY-|!?NLL_8ouFLy&-V&^5OVS-e#$N+X8aB%VbZvP2|v z*E@>^8_W~K_$YGs#K@JC6~|6O6BlI7Jr#T!An}w?nYSK(Ru)OfREE{##&1E&AIS0C zaI`e4I;5Li71X*qVce?~Qpv?qQ6)#BA8L<*+95^K4UXDJ8h(9~$Xe{NIYi*h@SZvy zNC@152;9fk`kI4ShU*^7I(MrqqTb=Z=Ki9`@F2j$p_A8r?%%x zdJD|T1R@(*E#(0^o&59rKl-LLZ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@?@D4ZdU*yaZv{;T_bou`hSn#C6w}drINZTU5+!n2$E zbVYOg>aK4wmBqZlV#3%grkF*@w*s3l0bWFWQ(l-nh=!QwDIRK#tfm787$$MWgb4K! z+LC9r;%??*v%7nSU0XhR2{VSFuiCn2`1oRJS-r#YD0+gq2y za}b=FioshWNHpxJlAJRqFF5Qay39a-8OumHV4Pp!q2ZkzUfRo(IX)6N-ZwpvB)%la zIy996(HZhDPF^|W1b_K%&y01Avr0%%=gv*iZq7rFhWR}*m^GsG8hcH}IFv;X$z~+% z9ntUiGwVujl2Hks6F3qVY2p*Db$ustcb-a4hs1K%hZl54u{}YY@xBsyul%EP{VfG{ zIC5sI$D0xK`YH#3C0k@GH89NJjX&a1P3NFOuhv+-45iH3mbWDnZ6M#r$t7s;XRJ&p zD&`X+duYMlsz~b3Xs38y+Dcibu#;I#({BA^)Z?&G^FoVV&3t0S=)m#}^7xLiU{mZK6D-|``+P0}l3n}lq}k&(bj_uFubF{ljqdbKLdI_Yxje@h z&_!CfoB8SBMKj#fu1hu-(Aie!WInDmm7bd1AmZt-6IRybd~gzywGK0$4KM)MfCIq) z9)<0x2#$fGi<+u}4k8d$L5v6u-?8)^W@?~~sD)PpkBab64RjY_M-6lo!4V1i$o=~w fC;nTSM@NFDqFyf&)PODKEg(UC#Cru00Dyl0{--~? diff --git a/ElectronJS/src/taskGrid/FlowChart_CN.html b/ElectronJS/src/taskGrid/FlowChart_CN.html index 13b57bc..d2ef1d2 100644 --- a/ElectronJS/src/taskGrid/FlowChart_CN.html +++ b/ElectronJS/src/taskGrid/FlowChart_CN.html @@ -235,6 +235,13 @@ +
+ + +
@@ -390,8 +397,8 @@
- - + +
diff --git a/ElectronJS/src/taskGrid/logic_CN.js b/ElectronJS/src/taskGrid/logic_CN.js index 837819b..a3f55b3 100644 --- a/ElectronJS/src/taskGrid/logic_CN.js +++ b/ElectronJS/src/taskGrid/logic_CN.js @@ -44,6 +44,7 @@ function changeGetDataParameters(msg, i) { msg["parameters"][i]["JSWaitTime"] = 0; //JS等待时间 msg["parameters"][i]["afterJS"] = ""; //执行后执行的js msg["parameters"][i]["afterJSWaitTime"] = 0; //执行后js等待时间 + msg["parameters"][i]["downloadPic"] = 0; //是否下载图片 } function handleAddElement(msg) { diff --git a/ElectronJS/tasks/57.json b/ElectronJS/tasks/57.json new file mode 100644 index 0000000..112c786 --- /dev/null +++ b/ElectronJS/tasks/57.json @@ -0,0 +1,335 @@ +{ + "id": 57, + "name": "图片下载", + "url": "https://www.jd.com", + "links": "https://www.jd.com", + "create_time": "5/20/2023, 8:18:15 PM", + "containJudge": false, + "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" + } + ], + "outputParameters": [ + { + "id": 0, + "name": "参数3_图片地址", + "desc": "", + "type": "string", + "exampleValue": "//m.360buyimg.com/babel/jfs/t1/223646/1/18719/254758/6458a465F7a57af84/f44d7d983018d9ed.png" + } + ], + "graph": [ + { + "index": 0, + "id": 0, + "parentId": 0, + "type": -1, + "option": 0, + "title": "root", + "sequence": [ + 1, + 4 + ], + "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", + "maxWaitTime": 10, + "scrollType": 0, + "scrollCount": 0 + } + }, + { + "id": -1, + "index": 2, + "parentId": 0, + "type": 1, + "option": 8, + "title": "循环", + "sequence": [ + 3 + ], + "isInLoop": false, + "position": 1, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "/html/body/div[4]/div[1]/div[4]/a", + "wait": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "scrollType": 0, + "scrollCount": 0, + "loopType": 1, + "pathList": "", + "textList": "", + "code": "", + "waitTime": 0, + "exitCount": 0, + "historyWait": 2, + "allXPaths": [ + "/html/body/div[4]/div[1]/div[4]/a[1]", + "//a[contains(., '平板電腦')]" + ] + } + }, + { + "id": -1, + "index": 3, + "parentId": 2, + "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": 1, + "contentType": 0, + "relative": true, + "name": "参数1_链接文本", + "desc": "", + "extractType": 0, + "relativeXPath": "", + "allXPaths": "", + "exampleValues": [ + { + "num": 0, + "value": "平板電腦" + }, + { + "num": 1, + "value": "爆款耳機" + }, + { + "num": 2, + "value": "手機" + }, + { + "num": 3, + "value": "數據線" + }, + { + "num": 4, + "value": "年貨節" + } + ], + "default": "", + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 2, + "contentType": 0, + "relative": true, + "name": "参数2_链接地址", + "desc": "", + "relativeXPath": "", + "allXPaths": "", + "exampleValues": [ + { + "num": 0, + "value": "https://search.jd.com/Search?keyword=%E5%B9%B3%E6%9D%BF%E7%94%B5%E8%84%91&enc=utf-8&wq=%E5%B9%B3%E6%9D%BF%E7%94%B5%E8%84%91&pvid=84c62205dccd43dfad1b6eb5fdf5077b" + }, + { + "num": 1, + "value": "https://audio.jd.com/" + }, + { + "num": 2, + "value": "https://search.jd.com/search?keyword=%E6%89%8B%E6%9C%BA&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=%E6%89%8B%E6%9C%BA&cid2=653&cid3=655&ev=exbrand_%E5%B0%8F%E7%B1%B3%EF%BC%88MI%EF%BC%89%5E&uc=0#J_searchWrap" + }, + { + "num": 3, + "value": "https://mall.jd.com/index-1000007418.html" + }, + { + "num": 4, + "value": "https://pro.jd.com/mall/active/22WyJjMqTCbvjj1YB3pSJssBonLR/index.html" + } + ], + "default": "", + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + } + ], + "loopType": 1 + } + }, + { + "id": 2, + "index": 4, + "parentId": 0, + "type": 1, + "option": 8, + "title": "循环", + "sequence": [ + 5 + ], + "isInLoop": false, + "position": 1, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "/html/body/div[5]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/div[1]/div/div[1]/div[1]/a[1]/img[1]", + "wait": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "scrollType": 0, + "scrollCount": 0, + "loopType": 1, + "pathList": "", + "textList": "", + "code": "", + "waitTime": 0, + "exitCount": 0, + "historyWait": 2, + "allXPaths": [ + "/html/body/div[5]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/div[1]/div[1]/div[1]/div[1]/a[1]/img[1]", + "//img[contains(., '')]" + ] + } + }, + { + "id": 3, + "index": 5, + "parentId": 2, + "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": 4, + "contentType": 0, + "relative": true, + "name": "参数3_图片地址", + "desc": "", + "extractType": 0, + "relativeXPath": "", + "allXPaths": "", + "exampleValues": [ + { + "num": 0, + "value": "//m.360buyimg.com/babel/jfs/t1/223646/1/18719/254758/6458a465F7a57af84/f44d7d983018d9ed.png" + }, + { + "num": 1, + "value": "//m.360buyimg.com/babel/s1420x740_jfs/t1/194401/20/32669/76553/64142a96F7733e6ad/cf2727848c86cf45.jpg!q70.dpg" + }, + { + "num": 2, + "value": "//m.360buyimg.com/babel/s1420x740_jfs/t1/222655/28/27238/153145/644b858eF2cd1200f/e37bd7da42a814b0.jpg!q70.dpg" + }, + { + "num": 3, + "value": "//m.360buyimg.com/babel/s710x370_jfs/t1/197659/30/31344/62825/640fd751F694963ed/a6e1ac2e5c27f160.jpg!q70.dpg" + }, + { + "num": 4, + "value": "//m.360buyimg.com/babel/s1420x740_jfs/t1/194401/20/32669/76553/64142a96F7733e6ad/cf2727848c86cf45.jpg!q70.dpg" + }, + { + "num": 5, + "value": "//m.360buyimg.com/babel/s1420x740_jfs/t1/222655/28/27238/153145/644b858eF2cd1200f/e37bd7da42a814b0.jpg!q70.dpg" + }, + { + "num": 6, + "value": "//m.360buyimg.com/babel/s710x370_jfs/t1/197659/30/31344/62825/640fd751F694963ed/a6e1ac2e5c27f160.jpg!q70.dpg" + }, + { + "num": 7, + "value": "//m.360buyimg.com/babel/jfs/t1/223646/1/18719/254758/6458a465F7a57af84/f44d7d983018d9ed.png" + }, + { + "num": 8, + "value": "//m.360buyimg.com/babel/s1420x740_jfs/t1/194401/20/32669/76553/64142a96F7733e6ad/cf2727848c86cf45.jpg!q70.dpg" + } + ], + "default": "", + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 1 + } + ] + } + } + ] +} \ No newline at end of file diff --git a/ElectronJS/tasks/58.json b/ElectronJS/tasks/58.json new file mode 100644 index 0000000..3a2e138 --- /dev/null +++ b/ElectronJS/tasks/58.json @@ -0,0 +1 @@ +{"id":58,"name":"新web采集任务","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"5/20/2023, 8:35:56 PM","containJudge":false,"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"}],"outputParameters":[{"id":0,"name":"参数1_图片地址","desc":"","type":"string","exampleValue":"//m.360buyimg.com/babel/jfs/t1/81488/28/23346/102165/63b41485F7ecc4f22/be5cee8cf04d7e16.png"}],"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","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[5]/div[1]/div[3]/div[1]/div[1]/div[2]/ul[1]/li/a[1]/img[1]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[5]/div[1]/div[3]/div[1]/div[1]/div[2]/ul[1]/li[1]/a[1]/img[1]","//img[contains(., '')]"]}},{"id":3,"index":3,"parentId":2,"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":4,"contentType":0,"relative":true,"name":"参数1_图片地址","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"//m.360buyimg.com/babel/jfs/t1/81488/28/23346/102165/63b41485F7ecc4f22/be5cee8cf04d7e16.png"},{"num":1,"value":"//m.360buyimg.com/babel/jfs/t1/93200/23/34752/53589/63b4148cF5150739b/5d0dc855fe43ca85.png"},{"num":2,"value":"//m.360buyimg.com/babel/jfs/t1/54690/10/22629/29568/63b41496Fad92ac75/605f4fe1c473192c.png"},{"num":3,"value":"//m.360buyimg.com/babel/jfs/t1/53202/29/23281/117684/63b4149dF2beb8956/ac86841f42a75cd0.png"},{"num":4,"value":"//m.360buyimg.com/babel/jfs/t1/90039/40/25105/65438/63b414a5Fb09a6926/740fb4daeef82c57.png"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":1}],"loopType":1}}]} \ No newline at end of file diff --git a/ElectronJS/tasks/59.json b/ElectronJS/tasks/59.json new file mode 100644 index 0000000..0a05073 --- /dev/null +++ b/ElectronJS/tasks/59.json @@ -0,0 +1 @@ +{"id":59,"name":"新web采集任务","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"5/20/2023, 8:41:56 PM","containJudge":false,"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"}],"outputParameters":[{"id":0,"name":"参数1_链接文本","desc":"","type":"string","exampleValue":"手机"},{"id":1,"name":"参数2_链接地址","desc":"","type":"string","exampleValue":"https://shouji.jd.com/"}],"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","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3],"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/a","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/a[1]","//a[contains(., '手机')]"]}},{"id":3,"index":3,"parentId":2,"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":1,"contentType":0,"relative":true,"name":"参数1_链接文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","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":"内衣"},{"num":13,"value":"男装"},{"num":14,"value":"女装"},{"num":15,"value":"童装"},{"num":16,"value":"箱包"},{"num":17,"value":"钟表"},{"num":18,"value":"珠宝"},{"num":19,"value":"女鞋"},{"num":20,"value":"运动"},{"num":21,"value":"户外"},{"num":22,"value":"男鞋"},{"num":23,"value":"汽车用品"},{"num":24,"value":"车载电器"},{"num":25,"value":"母婴"},{"num":26,"value":"洗护喂养"},{"num":27,"value":"玩具乐器"},{"num":28,"value":"宠物生活"},{"num":29,"value":"家庭清洁"},{"num":30,"value":"个人护理"},{"num":31,"value":"计生情趣"},{"num":32,"value":"图书"},{"num":33,"value":"童书"},{"num":34,"value":"文学"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数2_链接地址","desc":"","relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"https://shouji.jd.com/"},{"num":1,"value":"https://shuma.jd.com/"},{"num":2,"value":"https://search.jd.com/Search?keyword=%E5%B0%8F%E5%AE%B6%E7%94%B5&enc=utf-8&wq=%E5%B0%8F%E5%AE%B6%E7%94%B5&pvid=261a350161304c979fa0e7ce95c05671"},{"num":3,"value":"https://diannao.jd.com/"},{"num":4,"value":"https://bg.jd.com/"},{"num":5,"value":"https://channel.jd.com/jf.html"},{"num":6,"value":"https://channel.jd.com/home.html"},{"num":7,"value":"https://channel.jd.com/kitchenware.html"},{"num":8,"value":"https://channel.jd.com/furniture.html"},{"num":9,"value":"https://jzjc.jd.com/"},{"num":10,"value":"https://channel.jd.com/9855-9856.html"},{"num":11,"value":"https://pro.jd.com/mall/active/2u2DR1dUiK34csAE3DqmcG8aXvUK/index.html"},{"num":12,"value":"https://channel.jd.com/underwear.html"},{"num":13,"value":"https://channel.jd.com/1315-1342.html"},{"num":14,"value":"https://channel.jd.com/women.html"},{"num":15,"value":"https://list.jd.com/list.html?cat=1319,11842"},{"num":16,"value":"https://channel.jd.com/bag.html"},{"num":17,"value":"https://channel.jd.com/watch.html"},{"num":18,"value":"https://channel.jd.com/jewellery.html"},{"num":19,"value":"https://channel.jd.com/womensshoes.html"},{"num":20,"value":"https://phat.jd.com/10-109.html"},{"num":21,"value":"https://channel.jd.com/outdoor.html"},{"num":22,"value":"https://channel.jd.com/mensshoes.html"},{"num":23,"value":"https://che.jd.com/"},{"num":24,"value":"https://list.jd.com/list.html?cat=6728,6740&page=1&delivery_glb=1&stock=1&sort=sort_totalsales15_desc&trans=1&JL=4_7_0#J_main"},{"num":25,"value":"https://search.jd.com/Search?keyword=%E6%AF%8D%E5%A9%B4&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=%E6%AF%8D%E5%A9%B4&stock=1&gp=2&click=1"},{"num":26,"value":"https://channel.jd.com/feed.html"},{"num":27,"value":"https://toy.jd.com/"},{"num":28,"value":"https://channel.jd.com/pet.html"},{"num":29,"value":"https://channel.jd.com/beauty.html"},{"num":30,"value":"https://lady.jd.com/"},{"num":31,"value":"https://channel.jd.com/9192-9196.html"},{"num":32,"value":"https://book.jd.com/"},{"num":33,"value":"https://book.jd.com/children.html"},{"num":34,"value":"https://channel.jd.com/p_wenxuezongheguan.html"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/ExecuteStage/.gitignore b/ExecuteStage/.gitignore index d91cf51..918977c 100644 --- a/ExecuteStage/.gitignore +++ b/ExecuteStage/.gitignore @@ -11,4 +11,5 @@ Data/ tasks/ Application/ .history -execution_instances/ \ No newline at end of file +execution_instances/ +.DS_Store diff --git a/ExecuteStage/.vscode/launch.json b/ExecuteStage/.vscode/launch.json index 6216ed5..9b992a9 100644 --- a/ExecuteStage/.vscode/launch.json +++ b/ExecuteStage/.vscode/launch.json @@ -12,7 +12,7 @@ "console": "integratedTerminal", "justMyCode": true, // "args": ["--id", "38", "--read_type", "local", "--headless", "1"] - "args": ["--id", "10", "--headless", "0"] + "args": ["--id", "15", "--headless", "0"] } ] } \ No newline at end of file diff --git a/ExecuteStage/easyspider_executestage.py b/ExecuteStage/easyspider_executestage.py index 54f74bc..691ac1a 100644 --- a/ExecuteStage/easyspider_executestage.py +++ b/ExecuteStage/easyspider_executestage.py @@ -30,7 +30,7 @@ from selenium.webdriver.common.by import By from commandline_config import Config import pytesseract from PIL import Image - +import uuid saveName, log, OUTPUT, browser, SAVED = None, "", "", None, False @@ -65,6 +65,38 @@ def Log(text, text2=""): # 屏幕滚动函数 + +def download_image(url, save_directory): + # 定义浏览器头信息 + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' + } + + # 发送 GET 请求获取图片数据 + response = requests.get(url, headers=headers) + + # 检查响应状态码是否为成功状态 + if response.status_code == requests.codes.ok: + # 提取文件名 + file_name = url.split('/')[-1] + + # 生成唯一的新文件名 + new_file_name = str(uuid.uuid4()) + '_' + file_name + + # 构建保存路径 + save_path = os.path.join(save_directory, new_file_name) + + # 保存图片到本地 + with open(save_path, 'wb') as file: + file.write(response.content) + + print("图片已成功下载到:", save_path) + print("The image has been successfully downloaded to:", save_path) + else: + print("下载图片失败,请检查此图片链接是否有效:", url) + print("Failed to download image, please check if this image link is valid:", url) + + def scrollDown(para, rt=""): try: if para["scrollType"] != 0 and para["scrollCount"] > 0: # 控制屏幕向下滚动 @@ -180,6 +212,7 @@ def executeNode(nodeId, loopValue="", clickPath="", index=0): inputInfo(node["parameters"], loopValue) elif node["option"] == 5: # 自定义操作 customOperation(node, loopValue) + saveData() elif node["option"] == 8: # 循环 recordLog("loop") loopExcute(node, loopValue, clickPath, index) # 执行循环 @@ -644,8 +677,8 @@ def getData(para, loopElement, isInLoop=True, parentPath="", index=0): recordLog('Element %s not found, use default' % p["relativeXPath"]) continue except TimeoutException: # 超时的时候设置超时值 - Log('time out after 10 seconds when getting data') - recordLog('time out after 10 seconds when getting data') + Log('time out after set seconds when getting data') + recordLog('time out after set seconds when getting data') browser.execute_script('window.stop()') if p["relative"]: # 是否相对xpath if p["relativeXPath"] == "": # 相对xpath有时候就是元素本身,不需要二次查找 @@ -660,104 +693,44 @@ def getData(para, loopElement, isInLoop=True, parentPath="", index=0): element = browser.find_element(By.XPATH, "//body") try: execute_code(2, p["beforeJS"], p["beforeJSWaitTime"], element) # 执行前置js - if p["contentType"] == 2: - content = element.get_attribute('innerHTML') - elif p["contentType"] == 3: - content = element.get_attribute('outerHTML') - elif p["contentType"] == 4: - # 获取元素的背景图片地址 - bg_url = element.value_of_css_property('background-image') - # 清除背景图片地址中的多余字符 - bg_url = bg_url.replace('url("', '').replace('")', '') - content = bg_url - elif p["contentType"] == 5: - content = browser.current_url - elif p["contentType"] == 6: - content = browser.title - elif p["contentType"] == 7: - # 获取整个网页的高度和宽度 - height = browser.execute_script("return document.body.scrollHeight"); - width = browser.execute_script("return document.body.scrollWidth"); - # 调整浏览器窗口的大小 - browser.set_window_size(width, height) - element.screenshot("Data/" +saveName + "/"+ str(time.time()) + ".png") - elif p["contentType"] == 8: - try: - screenshot = element.screenshot_as_png - screenshot_stream = io.BytesIO(screenshot) - # 使用Pillow库打开截图,并转换为灰度图像 - image = Image.open(screenshot_stream).convert('L') - # 使用Tesseract OCR引擎识别图像中的文本 - text = pytesseract.image_to_string(image, lang='chi_sim+eng') - content = text - except Exception as e: - content = "OCR Error" - print("To use OCR, You need to install Tesseract-OCR and add it to the environment variable PATH: https://tesseract-ocr.github.io/tessdoc/Installation.html") - print("要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中:https://blog.csdn.net/u010454030/article/details/80515501") - elif p["contentType"] == 9: - content = execute_code(2, p["JS"], p["JSWaitTime"], element) - elif p["contentType"] == 1: # 只采集当期元素下的文本,不包括子元素 - command = 'var arr = [];\ - var content = arguments[0];\ - for(var i = 0, len = content.childNodes.length; i < len; i++) {\ - if(content.childNodes[i].nodeType === 3){ \ - arr.push(content.childNodes[i].nodeValue);\ - }\ - }\ - var str = arr.join(" "); \ - return str;' - content = browser.execute_script(command, element).replace( - "\n", "").replace("\\s+", " ") - if p["nodeType"] == 2: - if element.get_attribute("href") != None: - content = element.get_attribute("href") - else: - content = "" - elif p["nodeType"] == 3: - if element.get_attribute("value") != None: - content = element.get_attribute("value") - else: - content = "" - elif p["nodeType"] == 4: # 图片 - if element.get_attribute("src") != None: - content = element.get_attribute("src") - else: - content = "" - elif p["contentType"] == 0: - content = element.text - if p["nodeType"] == 2: - if element.get_attribute("href") != None: - content = element.get_attribute("href") - else: - content = "" - elif p["nodeType"] == 3: - if element.get_attribute("value") != None: - content = element.get_attribute("value") - else: - content = "" - elif p["nodeType"] == 4: # 图片 - if element.get_attribute("src") != None: - content = element.get_attribute("src") - else: - content = "" - except StaleElementReferenceException: # 发生找不到元素的异常后,等待几秒重新查找 - recordLog('StaleElementReferenceException:'+p["relativeXPath"]) - time.sleep(3) - try: - if p["relative"]: # 是否相对xpath - if p["relativeXPath"] == "": # 相对xpath有时候就是元素本身,不需要二次查找 - element = loopElement - recordLog('StaleElementReferenceException:loopElement') - else: - element = loopElement.find_element(By.XPATH, - p["relativeXPath"][1:]) - recordLog( - 'StaleElementReferenceException:loopElement+relativeXPath') + # 先处理特殊节点类型 + if p["nodeType"] == 2: + if element.get_attribute("href") != None: + content = element.get_attribute("href") else: - element = browser.find_element( - By.XPATH, p["relativeXPath"]) - recordLog('StaleElementReferenceException:relativeXPath') - if p["contentType"] == 2: + content = "" + elif p["nodeType"] == 3: + if element.get_attribute("value") != None: + content = element.get_attribute("value") + else: + content = "" + elif p["nodeType"] == 4: # 图片 + if element.get_attribute("src") != None: + content = element.get_attribute("src") + else: + content = "" + try: + downloadPic = p["downloadPic"] + except: + downloadPic = 0 + if downloadPic == 1: + download_image(content, "Data/" +saveName + "/") + else: # 普通节点 + if p["contentType"] == 0: + content = element.text + elif p["contentType"] == 1: # 只采集当期元素下的文本,不包括子元素 + command = 'var arr = [];\ + var content = arguments[0];\ + for(var i = 0, len = content.childNodes.length; i < len; i++) {\ + if(content.childNodes[i].nodeType === 3){ \ + arr.push(content.childNodes[i].nodeValue);\ + }\ + }\ + var str = arr.join(" "); \ + return str;' + content = browser.execute_script(command, element).replace( + "\n", "").replace("\\s+", " ") + elif p["contentType"] == 2: content = element.get_attribute('innerHTML') elif p["contentType"] == 3: content = element.get_attribute('outerHTML') @@ -788,55 +761,101 @@ def getData(para, loopElement, isInLoop=True, parentPath="", index=0): text = pytesseract.image_to_string(image, lang='chi_sim+eng') content = text except Exception as e: - content = "OCR失败" - print("To use OCR, You need to install Tesseract-OCR and add it to the environment variable path: https://tesseract-ocr.github.io/tessdoc/Installation.html") - print("要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量path中:") + content = "OCR Error" + print("To use OCR, You need to install Tesseract-OCR and add it to the environment variable PATH: https://tesseract-ocr.github.io/tessdoc/Installation.html") + print("要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中:https://blog.csdn.net/u010454030/article/details/80515501") elif p["contentType"] == 9: content = execute_code(2, p["JS"], p["JSWaitTime"], element) - elif p["contentType"] == 1: # 只采集当期元素下的文本,不包括子元素 - command = 'var arr = [];\ - var content = arguments[0];\ - for(var i = 0, len = content.childNodes.length; i < len; i++) {\ - if(content.childNodes[i].nodeType === 3){ \ - arr.push(content.childNodes[i].nodeValue);\ + except StaleElementReferenceException: # 发生找不到元素的异常后,等待几秒重新查找 + recordLog('StaleElementReferenceException:'+p["relativeXPath"]) + time.sleep(3) + try: + if p["relative"]: # 是否相对xpath + if p["relativeXPath"] == "": # 相对xpath有时候就是元素本身,不需要二次查找 + element = loopElement + recordLog('StaleElementReferenceException:loopElement') + else: + element = loopElement.find_element(By.XPATH, + p["relativeXPath"][1:]) + recordLog( + 'StaleElementReferenceException:loopElement+relativeXPath') + else: + element = browser.find_element( + By.XPATH, p["relativeXPath"]) + recordLog('StaleElementReferenceException:relativeXPath') + # 先处理特殊节点类型 + if p["nodeType"] == 2: + if element.get_attribute("href") != None: + content = element.get_attribute("href") + else: + content = "" + elif p["nodeType"] == 3: + if element.get_attribute("value") != None: + content = element.get_attribute("value") + else: + content = "" + elif p["nodeType"] == 4: # 图片 + if element.get_attribute("src") != None: + content = element.get_attribute("src") + else: + content = "" + try: + downloadPic = p["downloadPic"] + except: + downloadPic = 0 + if downloadPic == 1: + download_image(content, "Data/" +saveName + "/") + else: # 普通节点 + if p["contentType"] == 0: + content = element.text + elif p["contentType"] == 1: # 只采集当期元素下的文本,不包括子元素 + command = 'var arr = [];\ + var content = arguments[0];\ + for(var i = 0, len = content.childNodes.length; i < len; i++) {\ + if(content.childNodes[i].nodeType === 3){ \ + arr.push(content.childNodes[i].nodeValue);\ + }\ }\ - }\ - var str = arr.join(" "); \ - return str;' - content = browser.execute_script(command, element).replace( - "\n", "").replace("\\s+", " ") - if p["nodeType"] == 2: - if element.get_attribute("href") != None: - content = element.get_attribute("href") - else: - content = "" - elif p["nodeType"] == 3: - if element.get_attribute("value") != None: - content = element.get_attribute("value") - else: - content = "" - elif p["nodeType"] == 4: # 图片 - if element.get_attribute("src") != None: - content = element.get_attribute("src") - else: - content = "" - elif p["contentType"] == 0: - content = element.text - if p["nodeType"] == 2: - if element.get_attribute("href") != None: - content = element.get_attribute("href") - else: - content = "" - elif p["nodeType"] == 3: - if element.get_attribute("value") != None: - content = element.get_attribute("value") - else: - content = "" - elif p["nodeType"] == 4: # 图片 - if element.get_attribute("src") != None: - content = element.get_attribute("src") - else: - content = "" + var str = arr.join(" "); \ + return str;' + content = browser.execute_script(command, element).replace( + "\n", "").replace("\\s+", " ") + elif p["contentType"] == 2: + content = element.get_attribute('innerHTML') + elif p["contentType"] == 3: + content = element.get_attribute('outerHTML') + elif p["contentType"] == 4: + # 获取元素的背景图片地址 + bg_url = element.value_of_css_property('background-image') + # 清除背景图片地址中的多余字符 + bg_url = bg_url.replace('url("', '').replace('")', '') + content = bg_url + elif p["contentType"] == 5: + content = browser.current_url + elif p["contentType"] == 6: + content = browser.title + elif p["contentType"] == 7: + # 获取整个网页的高度和宽度 + height = browser.execute_script("return document.body.scrollHeight"); + width = browser.execute_script("return document.body.scrollWidth"); + # 调整浏览器窗口的大小 + browser.set_window_size(width, height) + element.screenshot("Data/" +saveName + "/"+ str(time.time()) + ".png") + elif p["contentType"] == 8: + try: + screenshot = element.screenshot_as_png + screenshot_stream = io.BytesIO(screenshot) + # 使用Pillow库打开截图,并转换为灰度图像 + image = Image.open(screenshot_stream).convert('L') + # 使用Tesseract OCR引擎识别图像中的文本 + text = pytesseract.image_to_string(image, lang='chi_sim+eng') + content = text + except Exception as e: + content = "OCR Error" + print("To use OCR, You need to install Tesseract-OCR and add it to the environment variable PATH: https://tesseract-ocr.github.io/tessdoc/Installation.html") + print("要使用OCR识别功能,你需要安装Tesseract-OCR并将其添加到环境变量PATH中:https://blog.csdn.net/u010454030/article/details/80515501") + elif p["contentType"] == 9: + content = execute_code(2, p["JS"], p["JSWaitTime"], element) except StaleElementReferenceException: recordLog('StaleElementReferenceException:'+p["relativeXPath"]) continue # 再出现类似问题直接跳过 @@ -859,7 +878,7 @@ def isnull(s): def saveData(exit=False): global saveName, log, OUTPUT, browser - if exit == True or len(OUTPUT) > 100: # 每100条保存一次 + if exit == True or len(OUTPUT) >= 100: # 每100条保存一次 with open("Data/"+saveName + '_log.txt', 'a', encoding='utf-8-sig') as file_obj: file_obj.write(log) file_obj.close() @@ -890,6 +909,7 @@ if __name__ == '__main__': "config_folder": "", "config_file_name": "config.json", "headless": False, + "version": "0.3.0", } c = Config(config) print(c) diff --git a/Extension/manifest_v3/.gitignore b/Extension/manifest_v3/.gitignore index c754570..68d9633 100644 --- a/Extension/manifest_v3/.gitignore +++ b/Extension/manifest_v3/.gitignore @@ -4,3 +4,5 @@ dist .env EasySpider_en EasySpider_zh +EasySpider_en.crx +EasySpider_zh.crx diff --git a/Extension/manifest_v3/EasySpider_en.crx b/Extension/manifest_v3/EasySpider_en.crx index 1a914783d16b438f1c95ac1aa1289b64de3af2d0..2410867da0e7a6b935e64a5a7bfab439d652204c 100644 GIT binary patch delta 1767 zcmY+?dpOez9{})eKW2^1Z9`0Qi^^q^JH0|=3Msc34%&H%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Doy^t)6_WtH53dmP#lGBkQ*1=D1$Nb-0p$h;;j=wPUxro{kvr=i28TQsn zZpRpT5D{OOfQ)!*{4KR6eFhX1Y*c0!=q25bUkLH19Nvj?M|ClEnywcUR@lj^uhKsU zQ-u>DMHYd8jWl1F^Y&CU3g0_&-H5D{e>OyBcAH+~x%4S4sB$=ddq>t0FCp1%x?tRjm diff --git a/Extension/manifest_v3/EasySpider_zh.crx b/Extension/manifest_v3/EasySpider_zh.crx index 4f888b646bc8f5d6b708757049d1c8868d99de6f..7fbfa8d4a836d972e3a4b4766e8660be8327dc57 100644 GIT binary patch delta 1767 zcmY+?eK^wz902fbKemyLvrWz{VUd<0M^Q*)-YyM!i%AT1ti0U3G)(dm^KL@ATNpBN zWjji!rIx&&(hC~LbsI-qDz8`W+Vk8!&;9lNd|#gD`^WcN)}nH`MWx7`_1N^Mn!s4E zfPD>X=&!35BO3X(xgz0qeB%!}WseJi3GENHW;yjp>(U_C18;r{R9!Sj>+vnTGyKc8 z6`sf$Fdalr3#4TmJ9&&j-Xbu>?8cPlwVm55RJlTTw&Z7HX<#w1c;rhp{c^LeR z5~0sdyfCNDh`^B+*NfY!ia_@FKdcZkbl%XZTpc?Dj7o4vQ@>8`FwK+nK zYc?yW?+x_Xv*W?0_s+bd8{=&hKh2!)G%)gL$e+bbW)*NpmsVM)o8rZX6E|+-98-3Y z9-zlZ0_nTET9vc2dpR?1)TZE0#_}&)S+Cb4W=R$cw=&=L6yx9%BS^6xO^6#MQE3u# zMLb1+|YVya}4)31z8+F7zs zab^6)gwto(JD$Igwru4Vo%9U!#!WL;heCryT6wL01Tj`*# z&uD$TsIHa!YcpAsjbn6OI!d>7HPV^d;eA5A!ZLaZSy9x%NX8W!k~2QosC9Vrr)I1UW*JUVK)+u15)ePh_K1<(nMxyJPMa zOEJgK?CL71|3%dM^}W>0eQwNpJ&p-lEPVfLRfgELAcADxBzW)!6MBQ|JWkQ`Qfox% zvx2d@hq?vEDt7J&SNAl%)4ttxCT4+q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r$t7s;XRJ&p zD&`X+duYMlsz~b3Xs38y+Dcibu#;I#({BA^)Z?&G^FoVV&3t0S=)m#}^7xLiU{mZK6D-|``+P0}l3n}lq}k&(bj_uFubF{ljqdbKLdI_Yxje@h z&_!CfoB8SBMKj#fu1hu-(Aie!WInDmm7bd1AmZt-6IRybd~gzywGK0$4KM)MfCIq) z9)<0x2#$fGi<+u}4k8d$L5v6u-?8)^W@?~~sD)PpkBab64RjY_M-6lo!4V1i$o=~w fC;nTSM@NFDqFyf&)PODKEg(UC#Cru00Dyl0{--~? diff --git a/Extension/manifest_v3/src/manifest.json b/Extension/manifest_v3/src/manifest.json index 80c602f..553290f 100644 --- a/Extension/manifest_v3/src/manifest.json +++ b/Extension/manifest_v3/src/manifest.json @@ -1,6 +1,6 @@ { "name": "EasySpider", - "version": "0.2", + "version": "0.3.0", "description": "EasySpider's chrome extension", "author": "Naibo Wang", "manifest_version": 3, diff --git a/Releases/EasySpider_windows_amd64/V0.3.0 New Features.txt b/Releases/EasySpider_windows_amd64/V0.3.0 New Features.txt new file mode 100644 index 0000000..2efcc75 --- /dev/null +++ b/Releases/EasySpider_windows_amd64/V0.3.0 New Features.txt @@ -0,0 +1,48 @@ +https://github.com/NaiboWang/EasySpider/releases/tag/v0.3.0 + +### 强烈建议大家观看新特性讲解视频 + +B站最新版特性视频已上传,新视频非常有用,推荐大家观看。 + +[【重要】自定义条件判断之使用循环项内的JS命令返回值 - 第二弹](https://www.bilibili.com/video/BV1mu411x7Nn/) + +[如何执行自己写的JS代码和系统代码 (自定义操作)](https://www.bilibili.com/video/BV1qs4y1z7Hc/) + +[如何自定义循环和判断条件 - 第一弹](https://www.bilibili.com/video/BV1Ys4y1z777/) + +[如何对元素和网页截图及(无头模式)命令行执行指南](https://www.bilibili.com/video/BV1dV4y1z764/) + +[OCR识别元素内容功能](https://www.bilibili.com/video/BV1xz4y1b72D/) + +注意,v0.3.0版本任务task文件夹内`.json`文件和v0.2.0版本不兼容,请重新设计v0.3.0版本任务。 + +## 更新说明 +1. 高级操作: + - 可以在任务流程中**执行自定义脚本**,包括在浏览器中**执行Javascript指令**以及**操作系统级别的脚本调用**并可**得到命令返回值并记录**,大大扩展了可操作空间。 + +![image](https://github.com/NaiboWang/EasySpider/assets/30287768/06e63a06-328d-4339-b40b-2d57c94cee66) + + - 在每一个操作执行前和执行后,都可以指定执行一段针对当前定位元素的JavaScript指令。 + + + +2. **判断条件和循环条件**中同样增加了**执行自定义脚本**,并根据自定义脚本的返回值是否为真来作为条件判断和循环的判断条件,同样极大的增加了任务的可操作性。 +![image](https://github.com/NaiboWang/EasySpider/assets/30287768/9dea0564-1a1c-487d-9fa4-427c5e284796) +3. 可同时生成多种XPath供用户选择,并**预装了XPath Helper扩展**供大家调试XPath。 +4. 增加采集元素背景图片地址,当前页面标题,当前页面URL地址功能。 +5. 增加保存元素截图功能,如要截图某元素或整个网页页面,可以用此功能(配合无头模式效果更好)。 +6. 增加下载图片功能(正式版,Beta版没有)。 +7. 增加OCR识别元素功能(使用此功能需首先自行安装Tesseract库:[https://blog.csdn.net/u010454030/article/details/80515501](https://blog.csdn.net/u010454030/article/details/80515501)) +8. 可直接提取对元素执行JavaScript代码后的返回值,实现如正则表达式,获得元素背景颜色等功能。 + + +9. 大幅增加使用提示和说明,使软件更易用(如增加了iframe标签的处理方式说明,各个选项的参数意义,以及循环项XPath的修改说明等等)。 +10. 执行命令时增加了如何用命令行执行任务的提示:[https://github.com/NaiboWang/EasySpider/wiki/Argument-Instruction](https://github.com/NaiboWang/EasySpider/wiki/Argument-Instruction)。 +![image](https://github.com/NaiboWang/EasySpider/assets/30287768/a9e774df-e345-4d51-b7c9-2c4dac0ec624) +11. 增加无头模式,即无浏览器界面模式配置。 +12. 修复了使用用户配置浏览器模式下的中文路径不能正确识别的问题。 +13. 修复了条件分支没有无条件分支时会卡死的问题。 +14. 修复了保存任务后会输入框卡死的问题。 +15. 打开网页操作和点击元素操作新增设置页面最长加载等待时间。 +16. 增加版本更新提示。 +17. 更新chrome版本为113。 \ No newline at end of file diff --git a/Releases/EasySpider_windows_amd64/config.json b/Releases/EasySpider_windows_amd64/config.json index 8adf8fa..02d4d28 100644 --- a/Releases/EasySpider_windows_amd64/config.json +++ b/Releases/EasySpider_windows_amd64/config.json @@ -1 +1 @@ -{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data","absolute_user_data_folder":"D:\\Documents\\Projects\\EasySpider\\Releases\\EasySpider_windows_amd64\\user_data1"} \ No newline at end of file +{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data12","absolute_user_data_folder":"D:\\Documents\\Projects\\EasySpider\\Releases\\EasySpider_windows_amd64\\user_data1"} \ No newline at end of file diff --git a/Releases/EasySpider_windows_amd64/execution_instances/0.json b/Releases/EasySpider_windows_amd64/execution_instances/0.json new file mode 100644 index 0000000..2458c17 --- /dev/null +++ b/Releases/EasySpider_windows_amd64/execution_instances/0.json @@ -0,0 +1 @@ +{"id":0,"name":"地震台网判断案例","url":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","create_time":"5/20/2023, 5:07:49 PM","containJudge":true,"desc":"http://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"http://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"http://www.ceic.ac.cn/history"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"string","exampleValue":"1","value":"1"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"2.8"},{"id":1,"name":"参数2_文本","desc":"","type":"string","exampleValue":"2023-05-2011:51:38"},{"id":2,"name":"参数3_文本","desc":"","type":"string","exampleValue":"24.97"},{"id":3,"name":"参数4_文本","desc":"","type":"string","exampleValue":"99.26"},{"id":4,"name":"参数5_文本","desc":"","type":"string","exampleValue":"10"},{"id":5,"name":"参数6_链接文本","desc":"","type":"string","exampleValue":"云南保山市隆阳区"},{"id":6,"name":"参数7_链接地址","desc":"","type":"string","exampleValue":"https://news.ceic.ac.cn/CD20230520115138.html"},{"id":7,"name":"参数8_文本","desc":"","type":"string","exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"string","exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"string","exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"string","exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"string","exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"string","exampleValue":"参考位置"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3,4],"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":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"weidu1\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"value":"1","allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']"]}},{"id":8,"index":5,"parentId":6,"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":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '2.8')]"],"exampleValues":[{"num":0,"value":"2.8"},{"num":2,"value":"2.9"},{"num":3,"value":"5.7"},{"num":4,"value":"3.2"},{"num":5,"value":"3.9"},{"num":6,"value":"6.4"},{"num":7,"value":"4.5"},{"num":8,"value":"3.0"},{"num":9,"value":"5.5"},{"num":10,"value":"3.0"},{"num":11,"value":"5.3"},{"num":12,"value":"5.5"},{"num":13,"value":"4.0"},{"num":14,"value":"3.0"},{"num":15,"value":"4.2"},{"num":16,"value":"4.5"},{"num":17,"value":"5.9"},{"num":18,"value":"3.6"},{"num":19,"value":"3.3"},{"num":20,"value":"3.1"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-05-20')]"],"exampleValues":[{"num":0,"value":"2023-05-2011:51:38"},{"num":2,"value":"2023-05-2009:03:26"},{"num":3,"value":"2023-05-1923:15:03"},{"num":4,"value":"2023-05-1918:26:43"},{"num":5,"value":"2023-05-1905:18:32"},{"num":6,"value":"2023-05-1807:02:01"},{"num":7,"value":"2023-05-1705:56:23"},{"num":8,"value":"2023-05-1619:28:37"},{"num":9,"value":"2023-05-1418:11:34"},{"num":10,"value":"2023-05-1416:49:13"},{"num":11,"value":"2023-05-1416:21:42"},{"num":12,"value":"2023-05-1207:19:45"},{"num":13,"value":"2023-05-1206:07:18"},{"num":14,"value":"2023-05-1204:49:57"},{"num":15,"value":"2023-05-1204:32:10"},{"num":16,"value":"2023-05-1202:34:04"},{"num":17,"value":"2023-05-1121:33:11"},{"num":18,"value":"2023-05-1008:38:11"},{"num":19,"value":"2023-05-0919:23:29"},{"num":20,"value":"2023-05-0918:22:15"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '24.97')]"],"exampleValues":[{"num":0,"value":"24.97"},{"num":2,"value":"34.26"},{"num":3,"value":"12.75"},{"num":4,"value":"41.31"},{"num":5,"value":"33.48"},{"num":6,"value":"15.10"},{"num":7,"value":"42.78"},{"num":8,"value":"28.08"},{"num":9,"value":"33.60"},{"num":10,"value":"38.14"},{"num":11,"value":"33.35"},{"num":12,"value":"40.25"},{"num":13,"value":"29.62"},{"num":14,"value":"29.66"},{"num":15,"value":"29.63"},{"num":16,"value":"29.64"},{"num":17,"value":"24.00"},{"num":18,"value":"28.11"},{"num":19,"value":"41.20"},{"num":20,"value":"35.78"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '99.26')]"],"exampleValues":[{"num":0,"value":"99.26"},{"num":2,"value":"113.66"},{"num":3,"value":"49.00"},{"num":4,"value":"84.03"},{"num":5,"value":"91.05"},{"num":6,"value":"-90.90"},{"num":7,"value":"80.59"},{"num":8,"value":"105.12"},{"num":9,"value":"139.45"},{"num":10,"value":"75.66"},{"num":11,"value":"139.40"},{"num":12,"value":"-120.90"},{"num":13,"value":"102.03"},{"num":14,"value":"102.01"},{"num":15,"value":"102.02"},{"num":16,"value":"102.04"},{"num":17,"value":"125.40"},{"num":18,"value":"105.09"},{"num":19,"value":"83.28"},{"num":20,"value":"79.81"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '10')]"],"exampleValues":[{"num":0,"value":"10"},{"num":2,"value":"10"},{"num":3,"value":"10"},{"num":4,"value":"10"},{"num":5,"value":"10"},{"num":6,"value":"250"},{"num":7,"value":"10"},{"num":8,"value":"10"},{"num":9,"value":"10"},{"num":10,"value":"118"},{"num":11,"value":"10"},{"num":12,"value":"10"},{"num":13,"value":"10"},{"num":14,"value":"9"},{"num":15,"value":"10"},{"num":16,"value":"10"},{"num":17,"value":"10"},{"num":18,"value":"8"},{"num":19,"value":"15"},{"num":20,"value":"10"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"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":"美国加利福尼亚州"},{"num":13,"value":"四川甘孜州泸定县"},{"num":14,"value":"四川甘孜州泸定县"},{"num":15,"value":"四川甘孜州泸定县"},{"num":16,"value":"四川甘孜州泸定县"},{"num":17,"value":"琉球群岛"},{"num":18,"value":"四川宜宾市兴文县"},{"num":19,"value":"新疆阿克苏地区库车市"},{"num":20,"value":"新疆和田地区和田县"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CD20230520115138.html"},{"num":2,"value":"https://news.ceic.ac.cn/CD20230520090326.html"},{"num":3,"value":"https://news.ceic.ac.cn/CC20230519231504.html"},{"num":4,"value":"https://news.ceic.ac.cn/CD20230519182644.html"},{"num":5,"value":"https://news.ceic.ac.cn/CD20230519051833.html"},{"num":6,"value":"https://news.ceic.ac.cn/CC20230518070201.html"},{"num":7,"value":"https://news.ceic.ac.cn/CD20230517055623.html"},{"num":8,"value":"https://news.ceic.ac.cn/CD20230516192837.html"},{"num":9,"value":"https://news.ceic.ac.cn/CC20230514181134.html"},{"num":10,"value":"https://news.ceic.ac.cn/CD20230514164913.html"},{"num":11,"value":"https://news.ceic.ac.cn/CC20230514162142.html"},{"num":12,"value":"https://news.ceic.ac.cn/CC20230512071946.html"},{"num":13,"value":"https://news.ceic.ac.cn/CC20230512060719.html"},{"num":14,"value":"https://news.ceic.ac.cn/CD20230512044957.html"},{"num":15,"value":"https://news.ceic.ac.cn/CC20230512043211.html"},{"num":16,"value":"https://news.ceic.ac.cn/CC20230512023404.html"},{"num":17,"value":"https://news.ceic.ac.cn/CC20230511213311.html"},{"num":18,"value":"https://news.ceic.ac.cn/CC20230510083811.html"},{"num":19,"value":"https://news.ceic.ac.cn/CD20230509192329.html"},{"num":20,"value":"https://news.ceic.ac.cn/CD20230509182216.html"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]"],"exampleValues":[{"num":1,"value":"参考位置"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0}],"loopType":1}},{"id":5,"index":6,"parentId":4,"type":2,"option":9,"title":"判断条件","sequence":[7,8],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":6,"parentId":5,"index":7,"type":3,"option":10,"title":"条件分支","sequence":[5],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"7","value":"","code":"return arguments[0].innerText.indexOf(\"20\") >= 0","waitTime":0},"position":0},{"id":7,"parentId":5,"index":8,"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}]} \ No newline at end of file diff --git a/Releases/EasySpider_windows_amd64/execution_instances/1.json b/Releases/EasySpider_windows_amd64/execution_instances/1.json new file mode 100644 index 0000000..ba2f2ed --- /dev/null +++ b/Releases/EasySpider_windows_amd64/execution_instances/1.json @@ -0,0 +1 @@ +{"id":1,"name":"地震台网判断案例","url":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","create_time":"5/20/2023, 5:07:49 PM","containJudge":true,"desc":"http://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"http://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"http://www.ceic.ac.cn/history"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"string","exampleValue":"1","value":"1"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"2.8"},{"id":1,"name":"参数2_文本","desc":"","type":"string","exampleValue":"2023-05-2011:51:38"},{"id":2,"name":"参数3_文本","desc":"","type":"string","exampleValue":"24.97"},{"id":3,"name":"参数4_文本","desc":"","type":"string","exampleValue":"99.26"},{"id":4,"name":"参数5_文本","desc":"","type":"string","exampleValue":"10"},{"id":5,"name":"参数6_链接文本","desc":"","type":"string","exampleValue":"云南保山市隆阳区"},{"id":6,"name":"参数7_链接地址","desc":"","type":"string","exampleValue":"https://news.ceic.ac.cn/CD20230520115138.html"},{"id":7,"name":"参数8_文本","desc":"","type":"string","exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"string","exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"string","exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"string","exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"string","exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"string","exampleValue":"参考位置"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3,4],"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":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"weidu1\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"value":"1","allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']"]}},{"id":8,"index":5,"parentId":6,"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":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '2.8')]"],"exampleValues":[{"num":0,"value":"2.8"},{"num":2,"value":"2.9"},{"num":3,"value":"5.7"},{"num":4,"value":"3.2"},{"num":5,"value":"3.9"},{"num":6,"value":"6.4"},{"num":7,"value":"4.5"},{"num":8,"value":"3.0"},{"num":9,"value":"5.5"},{"num":10,"value":"3.0"},{"num":11,"value":"5.3"},{"num":12,"value":"5.5"},{"num":13,"value":"4.0"},{"num":14,"value":"3.0"},{"num":15,"value":"4.2"},{"num":16,"value":"4.5"},{"num":17,"value":"5.9"},{"num":18,"value":"3.6"},{"num":19,"value":"3.3"},{"num":20,"value":"3.1"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-05-20')]"],"exampleValues":[{"num":0,"value":"2023-05-2011:51:38"},{"num":2,"value":"2023-05-2009:03:26"},{"num":3,"value":"2023-05-1923:15:03"},{"num":4,"value":"2023-05-1918:26:43"},{"num":5,"value":"2023-05-1905:18:32"},{"num":6,"value":"2023-05-1807:02:01"},{"num":7,"value":"2023-05-1705:56:23"},{"num":8,"value":"2023-05-1619:28:37"},{"num":9,"value":"2023-05-1418:11:34"},{"num":10,"value":"2023-05-1416:49:13"},{"num":11,"value":"2023-05-1416:21:42"},{"num":12,"value":"2023-05-1207:19:45"},{"num":13,"value":"2023-05-1206:07:18"},{"num":14,"value":"2023-05-1204:49:57"},{"num":15,"value":"2023-05-1204:32:10"},{"num":16,"value":"2023-05-1202:34:04"},{"num":17,"value":"2023-05-1121:33:11"},{"num":18,"value":"2023-05-1008:38:11"},{"num":19,"value":"2023-05-0919:23:29"},{"num":20,"value":"2023-05-0918:22:15"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '24.97')]"],"exampleValues":[{"num":0,"value":"24.97"},{"num":2,"value":"34.26"},{"num":3,"value":"12.75"},{"num":4,"value":"41.31"},{"num":5,"value":"33.48"},{"num":6,"value":"15.10"},{"num":7,"value":"42.78"},{"num":8,"value":"28.08"},{"num":9,"value":"33.60"},{"num":10,"value":"38.14"},{"num":11,"value":"33.35"},{"num":12,"value":"40.25"},{"num":13,"value":"29.62"},{"num":14,"value":"29.66"},{"num":15,"value":"29.63"},{"num":16,"value":"29.64"},{"num":17,"value":"24.00"},{"num":18,"value":"28.11"},{"num":19,"value":"41.20"},{"num":20,"value":"35.78"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '99.26')]"],"exampleValues":[{"num":0,"value":"99.26"},{"num":2,"value":"113.66"},{"num":3,"value":"49.00"},{"num":4,"value":"84.03"},{"num":5,"value":"91.05"},{"num":6,"value":"-90.90"},{"num":7,"value":"80.59"},{"num":8,"value":"105.12"},{"num":9,"value":"139.45"},{"num":10,"value":"75.66"},{"num":11,"value":"139.40"},{"num":12,"value":"-120.90"},{"num":13,"value":"102.03"},{"num":14,"value":"102.01"},{"num":15,"value":"102.02"},{"num":16,"value":"102.04"},{"num":17,"value":"125.40"},{"num":18,"value":"105.09"},{"num":19,"value":"83.28"},{"num":20,"value":"79.81"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '10')]"],"exampleValues":[{"num":0,"value":"10"},{"num":2,"value":"10"},{"num":3,"value":"10"},{"num":4,"value":"10"},{"num":5,"value":"10"},{"num":6,"value":"250"},{"num":7,"value":"10"},{"num":8,"value":"10"},{"num":9,"value":"10"},{"num":10,"value":"118"},{"num":11,"value":"10"},{"num":12,"value":"10"},{"num":13,"value":"10"},{"num":14,"value":"9"},{"num":15,"value":"10"},{"num":16,"value":"10"},{"num":17,"value":"10"},{"num":18,"value":"8"},{"num":19,"value":"15"},{"num":20,"value":"10"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"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":"美国加利福尼亚州"},{"num":13,"value":"四川甘孜州泸定县"},{"num":14,"value":"四川甘孜州泸定县"},{"num":15,"value":"四川甘孜州泸定县"},{"num":16,"value":"四川甘孜州泸定县"},{"num":17,"value":"琉球群岛"},{"num":18,"value":"四川宜宾市兴文县"},{"num":19,"value":"新疆阿克苏地区库车市"},{"num":20,"value":"新疆和田地区和田县"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CD20230520115138.html"},{"num":2,"value":"https://news.ceic.ac.cn/CD20230520090326.html"},{"num":3,"value":"https://news.ceic.ac.cn/CC20230519231504.html"},{"num":4,"value":"https://news.ceic.ac.cn/CD20230519182644.html"},{"num":5,"value":"https://news.ceic.ac.cn/CD20230519051833.html"},{"num":6,"value":"https://news.ceic.ac.cn/CC20230518070201.html"},{"num":7,"value":"https://news.ceic.ac.cn/CD20230517055623.html"},{"num":8,"value":"https://news.ceic.ac.cn/CD20230516192837.html"},{"num":9,"value":"https://news.ceic.ac.cn/CC20230514181134.html"},{"num":10,"value":"https://news.ceic.ac.cn/CD20230514164913.html"},{"num":11,"value":"https://news.ceic.ac.cn/CC20230514162142.html"},{"num":12,"value":"https://news.ceic.ac.cn/CC20230512071946.html"},{"num":13,"value":"https://news.ceic.ac.cn/CC20230512060719.html"},{"num":14,"value":"https://news.ceic.ac.cn/CD20230512044957.html"},{"num":15,"value":"https://news.ceic.ac.cn/CC20230512043211.html"},{"num":16,"value":"https://news.ceic.ac.cn/CC20230512023404.html"},{"num":17,"value":"https://news.ceic.ac.cn/CC20230511213311.html"},{"num":18,"value":"https://news.ceic.ac.cn/CC20230510083811.html"},{"num":19,"value":"https://news.ceic.ac.cn/CD20230509192329.html"},{"num":20,"value":"https://news.ceic.ac.cn/CD20230509182216.html"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]"],"exampleValues":[{"num":1,"value":"参考位置"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0}],"loopType":1}},{"id":5,"index":6,"parentId":4,"type":2,"option":9,"title":"判断条件","sequence":[7,8],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":6,"parentId":5,"index":7,"type":3,"option":10,"title":"条件分支","sequence":[5],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"7","value":"","code":"return arguments[0].innerText.indexOf(\"20\") >= 0","waitTime":0},"position":0},{"id":7,"parentId":5,"index":8,"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}]} \ No newline at end of file diff --git a/Releases/EasySpider_windows_amd64/execution_instances/2.json b/Releases/EasySpider_windows_amd64/execution_instances/2.json new file mode 100644 index 0000000..9e3d065 --- /dev/null +++ b/Releases/EasySpider_windows_amd64/execution_instances/2.json @@ -0,0 +1 @@ +{"id":2,"name":"地震台网判断案例","url":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","create_time":"5/20/2023, 5:35:52 PM","containJudge":true,"desc":"http://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"http://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"http://www.ceic.ac.cn/history"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"string","exampleValue":"1","value":"1"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"2.8"},{"id":1,"name":"参数2_文本","desc":"","type":"string","exampleValue":"2023-05-2011:51:38"},{"id":2,"name":"参数3_文本","desc":"","type":"string","exampleValue":"24.97"},{"id":3,"name":"参数4_文本","desc":"","type":"string","exampleValue":"99.26"},{"id":4,"name":"参数5_文本","desc":"","type":"string","exampleValue":"10"},{"id":5,"name":"参数6_链接文本","desc":"","type":"string","exampleValue":"云南保山市隆阳区"},{"id":6,"name":"参数7_链接地址","desc":"","type":"string","exampleValue":"https://news.ceic.ac.cn/CD20230520115138.html"},{"id":7,"name":"参数8_文本","desc":"","type":"string","exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"string","exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"string","exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"string","exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"string","exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"string","exampleValue":"参考位置"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3,4],"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":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"weidu1\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"value":"1","allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']"]}},{"id":8,"index":5,"parentId":6,"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":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '2.8')]"],"exampleValues":[{"num":0,"value":"2.8"},{"num":2,"value":"2.9"},{"num":3,"value":"5.7"},{"num":4,"value":"3.2"},{"num":5,"value":"3.9"},{"num":6,"value":"6.4"},{"num":7,"value":"4.5"},{"num":8,"value":"3.0"},{"num":9,"value":"5.5"},{"num":10,"value":"3.0"},{"num":11,"value":"5.3"},{"num":12,"value":"5.5"},{"num":13,"value":"4.0"},{"num":14,"value":"3.0"},{"num":15,"value":"4.2"},{"num":16,"value":"4.5"},{"num":17,"value":"5.9"},{"num":18,"value":"3.6"},{"num":19,"value":"3.3"},{"num":20,"value":"3.1"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-05-20')]"],"exampleValues":[{"num":0,"value":"2023-05-2011:51:38"},{"num":2,"value":"2023-05-2009:03:26"},{"num":3,"value":"2023-05-1923:15:03"},{"num":4,"value":"2023-05-1918:26:43"},{"num":5,"value":"2023-05-1905:18:32"},{"num":6,"value":"2023-05-1807:02:01"},{"num":7,"value":"2023-05-1705:56:23"},{"num":8,"value":"2023-05-1619:28:37"},{"num":9,"value":"2023-05-1418:11:34"},{"num":10,"value":"2023-05-1416:49:13"},{"num":11,"value":"2023-05-1416:21:42"},{"num":12,"value":"2023-05-1207:19:45"},{"num":13,"value":"2023-05-1206:07:18"},{"num":14,"value":"2023-05-1204:49:57"},{"num":15,"value":"2023-05-1204:32:10"},{"num":16,"value":"2023-05-1202:34:04"},{"num":17,"value":"2023-05-1121:33:11"},{"num":18,"value":"2023-05-1008:38:11"},{"num":19,"value":"2023-05-0919:23:29"},{"num":20,"value":"2023-05-0918:22:15"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '24.97')]"],"exampleValues":[{"num":0,"value":"24.97"},{"num":2,"value":"34.26"},{"num":3,"value":"12.75"},{"num":4,"value":"41.31"},{"num":5,"value":"33.48"},{"num":6,"value":"15.10"},{"num":7,"value":"42.78"},{"num":8,"value":"28.08"},{"num":9,"value":"33.60"},{"num":10,"value":"38.14"},{"num":11,"value":"33.35"},{"num":12,"value":"40.25"},{"num":13,"value":"29.62"},{"num":14,"value":"29.66"},{"num":15,"value":"29.63"},{"num":16,"value":"29.64"},{"num":17,"value":"24.00"},{"num":18,"value":"28.11"},{"num":19,"value":"41.20"},{"num":20,"value":"35.78"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '99.26')]"],"exampleValues":[{"num":0,"value":"99.26"},{"num":2,"value":"113.66"},{"num":3,"value":"49.00"},{"num":4,"value":"84.03"},{"num":5,"value":"91.05"},{"num":6,"value":"-90.90"},{"num":7,"value":"80.59"},{"num":8,"value":"105.12"},{"num":9,"value":"139.45"},{"num":10,"value":"75.66"},{"num":11,"value":"139.40"},{"num":12,"value":"-120.90"},{"num":13,"value":"102.03"},{"num":14,"value":"102.01"},{"num":15,"value":"102.02"},{"num":16,"value":"102.04"},{"num":17,"value":"125.40"},{"num":18,"value":"105.09"},{"num":19,"value":"83.28"},{"num":20,"value":"79.81"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '10')]"],"exampleValues":[{"num":0,"value":"10"},{"num":2,"value":"10"},{"num":3,"value":"10"},{"num":4,"value":"10"},{"num":5,"value":"10"},{"num":6,"value":"250"},{"num":7,"value":"10"},{"num":8,"value":"10"},{"num":9,"value":"10"},{"num":10,"value":"118"},{"num":11,"value":"10"},{"num":12,"value":"10"},{"num":13,"value":"10"},{"num":14,"value":"9"},{"num":15,"value":"10"},{"num":16,"value":"10"},{"num":17,"value":"10"},{"num":18,"value":"8"},{"num":19,"value":"15"},{"num":20,"value":"10"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"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":"美国加利福尼亚州"},{"num":13,"value":"四川甘孜州泸定县"},{"num":14,"value":"四川甘孜州泸定县"},{"num":15,"value":"四川甘孜州泸定县"},{"num":16,"value":"四川甘孜州泸定县"},{"num":17,"value":"琉球群岛"},{"num":18,"value":"四川宜宾市兴文县"},{"num":19,"value":"新疆阿克苏地区库车市"},{"num":20,"value":"新疆和田地区和田县"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CD20230520115138.html"},{"num":2,"value":"https://news.ceic.ac.cn/CD20230520090326.html"},{"num":3,"value":"https://news.ceic.ac.cn/CC20230519231504.html"},{"num":4,"value":"https://news.ceic.ac.cn/CD20230519182644.html"},{"num":5,"value":"https://news.ceic.ac.cn/CD20230519051833.html"},{"num":6,"value":"https://news.ceic.ac.cn/CC20230518070201.html"},{"num":7,"value":"https://news.ceic.ac.cn/CD20230517055623.html"},{"num":8,"value":"https://news.ceic.ac.cn/CD20230516192837.html"},{"num":9,"value":"https://news.ceic.ac.cn/CC20230514181134.html"},{"num":10,"value":"https://news.ceic.ac.cn/CD20230514164913.html"},{"num":11,"value":"https://news.ceic.ac.cn/CC20230514162142.html"},{"num":12,"value":"https://news.ceic.ac.cn/CC20230512071946.html"},{"num":13,"value":"https://news.ceic.ac.cn/CC20230512060719.html"},{"num":14,"value":"https://news.ceic.ac.cn/CD20230512044957.html"},{"num":15,"value":"https://news.ceic.ac.cn/CC20230512043211.html"},{"num":16,"value":"https://news.ceic.ac.cn/CC20230512023404.html"},{"num":17,"value":"https://news.ceic.ac.cn/CC20230511213311.html"},{"num":18,"value":"https://news.ceic.ac.cn/CC20230510083811.html"},{"num":19,"value":"https://news.ceic.ac.cn/CD20230509192329.html"},{"num":20,"value":"https://news.ceic.ac.cn/CD20230509182216.html"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]"],"exampleValues":[{"num":1,"value":"参考位置"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0}],"loopType":1}},{"id":5,"index":6,"parentId":4,"type":2,"option":9,"title":"判断条件","sequence":[7,8],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":6,"parentId":5,"index":7,"type":3,"option":10,"title":"条件分支","sequence":[5],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"7","value":"","code":"return document.evaluate(\"./td[5]\", arguments[0], null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText.indexOf(\"20\") >= 0","waitTime":0},"position":0},{"id":7,"parentId":5,"index":8,"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}]} \ No newline at end of file diff --git a/Releases/EasySpider_windows_amd64/execution_instances/3.json b/Releases/EasySpider_windows_amd64/execution_instances/3.json new file mode 100644 index 0000000..c17b101 --- /dev/null +++ b/Releases/EasySpider_windows_amd64/execution_instances/3.json @@ -0,0 +1 @@ +{"id":3,"name":"地震台网判断案例","url":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","create_time":"5/20/2023, 5:38:06 PM","containJudge":true,"desc":"http://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"http://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"http://www.ceic.ac.cn/history"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"string","exampleValue":"1","value":"1"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"2.8"},{"id":1,"name":"参数2_文本","desc":"","type":"string","exampleValue":"2023-05-2011:51:38"},{"id":2,"name":"参数3_文本","desc":"","type":"string","exampleValue":"24.97"},{"id":3,"name":"参数4_文本","desc":"","type":"string","exampleValue":"99.26"},{"id":4,"name":"参数5_文本","desc":"","type":"string","exampleValue":"10"},{"id":5,"name":"参数6_链接文本","desc":"","type":"string","exampleValue":"云南保山市隆阳区"},{"id":6,"name":"参数7_链接地址","desc":"","type":"string","exampleValue":"https://news.ceic.ac.cn/CD20230520115138.html"},{"id":7,"name":"参数8_文本","desc":"","type":"string","exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"string","exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"string","exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"string","exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"string","exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"string","exampleValue":"参考位置"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3,4],"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":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"weidu1\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"value":"1","allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']"]}},{"id":8,"index":5,"parentId":6,"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":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '2.8')]"],"exampleValues":[{"num":0,"value":"2.8"},{"num":2,"value":"2.9"},{"num":3,"value":"5.7"},{"num":4,"value":"3.2"},{"num":5,"value":"3.9"},{"num":6,"value":"6.4"},{"num":7,"value":"4.5"},{"num":8,"value":"3.0"},{"num":9,"value":"5.5"},{"num":10,"value":"3.0"},{"num":11,"value":"5.3"},{"num":12,"value":"5.5"},{"num":13,"value":"4.0"},{"num":14,"value":"3.0"},{"num":15,"value":"4.2"},{"num":16,"value":"4.5"},{"num":17,"value":"5.9"},{"num":18,"value":"3.6"},{"num":19,"value":"3.3"},{"num":20,"value":"3.1"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-05-20')]"],"exampleValues":[{"num":0,"value":"2023-05-2011:51:38"},{"num":2,"value":"2023-05-2009:03:26"},{"num":3,"value":"2023-05-1923:15:03"},{"num":4,"value":"2023-05-1918:26:43"},{"num":5,"value":"2023-05-1905:18:32"},{"num":6,"value":"2023-05-1807:02:01"},{"num":7,"value":"2023-05-1705:56:23"},{"num":8,"value":"2023-05-1619:28:37"},{"num":9,"value":"2023-05-1418:11:34"},{"num":10,"value":"2023-05-1416:49:13"},{"num":11,"value":"2023-05-1416:21:42"},{"num":12,"value":"2023-05-1207:19:45"},{"num":13,"value":"2023-05-1206:07:18"},{"num":14,"value":"2023-05-1204:49:57"},{"num":15,"value":"2023-05-1204:32:10"},{"num":16,"value":"2023-05-1202:34:04"},{"num":17,"value":"2023-05-1121:33:11"},{"num":18,"value":"2023-05-1008:38:11"},{"num":19,"value":"2023-05-0919:23:29"},{"num":20,"value":"2023-05-0918:22:15"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '24.97')]"],"exampleValues":[{"num":0,"value":"24.97"},{"num":2,"value":"34.26"},{"num":3,"value":"12.75"},{"num":4,"value":"41.31"},{"num":5,"value":"33.48"},{"num":6,"value":"15.10"},{"num":7,"value":"42.78"},{"num":8,"value":"28.08"},{"num":9,"value":"33.60"},{"num":10,"value":"38.14"},{"num":11,"value":"33.35"},{"num":12,"value":"40.25"},{"num":13,"value":"29.62"},{"num":14,"value":"29.66"},{"num":15,"value":"29.63"},{"num":16,"value":"29.64"},{"num":17,"value":"24.00"},{"num":18,"value":"28.11"},{"num":19,"value":"41.20"},{"num":20,"value":"35.78"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '99.26')]"],"exampleValues":[{"num":0,"value":"99.26"},{"num":2,"value":"113.66"},{"num":3,"value":"49.00"},{"num":4,"value":"84.03"},{"num":5,"value":"91.05"},{"num":6,"value":"-90.90"},{"num":7,"value":"80.59"},{"num":8,"value":"105.12"},{"num":9,"value":"139.45"},{"num":10,"value":"75.66"},{"num":11,"value":"139.40"},{"num":12,"value":"-120.90"},{"num":13,"value":"102.03"},{"num":14,"value":"102.01"},{"num":15,"value":"102.02"},{"num":16,"value":"102.04"},{"num":17,"value":"125.40"},{"num":18,"value":"105.09"},{"num":19,"value":"83.28"},{"num":20,"value":"79.81"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '10')]"],"exampleValues":[{"num":0,"value":"10"},{"num":2,"value":"10"},{"num":3,"value":"10"},{"num":4,"value":"10"},{"num":5,"value":"10"},{"num":6,"value":"250"},{"num":7,"value":"10"},{"num":8,"value":"10"},{"num":9,"value":"10"},{"num":10,"value":"118"},{"num":11,"value":"10"},{"num":12,"value":"10"},{"num":13,"value":"10"},{"num":14,"value":"9"},{"num":15,"value":"10"},{"num":16,"value":"10"},{"num":17,"value":"10"},{"num":18,"value":"8"},{"num":19,"value":"15"},{"num":20,"value":"10"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"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":"美国加利福尼亚州"},{"num":13,"value":"四川甘孜州泸定县"},{"num":14,"value":"四川甘孜州泸定县"},{"num":15,"value":"四川甘孜州泸定县"},{"num":16,"value":"四川甘孜州泸定县"},{"num":17,"value":"琉球群岛"},{"num":18,"value":"四川宜宾市兴文县"},{"num":19,"value":"新疆阿克苏地区库车市"},{"num":20,"value":"新疆和田地区和田县"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CD20230520115138.html"},{"num":2,"value":"https://news.ceic.ac.cn/CD20230520090326.html"},{"num":3,"value":"https://news.ceic.ac.cn/CC20230519231504.html"},{"num":4,"value":"https://news.ceic.ac.cn/CD20230519182644.html"},{"num":5,"value":"https://news.ceic.ac.cn/CD20230519051833.html"},{"num":6,"value":"https://news.ceic.ac.cn/CC20230518070201.html"},{"num":7,"value":"https://news.ceic.ac.cn/CD20230517055623.html"},{"num":8,"value":"https://news.ceic.ac.cn/CD20230516192837.html"},{"num":9,"value":"https://news.ceic.ac.cn/CC20230514181134.html"},{"num":10,"value":"https://news.ceic.ac.cn/CD20230514164913.html"},{"num":11,"value":"https://news.ceic.ac.cn/CC20230514162142.html"},{"num":12,"value":"https://news.ceic.ac.cn/CC20230512071946.html"},{"num":13,"value":"https://news.ceic.ac.cn/CC20230512060719.html"},{"num":14,"value":"https://news.ceic.ac.cn/CD20230512044957.html"},{"num":15,"value":"https://news.ceic.ac.cn/CC20230512043211.html"},{"num":16,"value":"https://news.ceic.ac.cn/CC20230512023404.html"},{"num":17,"value":"https://news.ceic.ac.cn/CC20230511213311.html"},{"num":18,"value":"https://news.ceic.ac.cn/CC20230510083811.html"},{"num":19,"value":"https://news.ceic.ac.cn/CD20230509192329.html"},{"num":20,"value":"https://news.ceic.ac.cn/CD20230509182216.html"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]"],"exampleValues":[{"num":1,"value":"参考位置"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0}],"loopType":1}},{"id":5,"index":6,"parentId":4,"type":2,"option":9,"title":"判断条件","sequence":[7,8],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":6,"parentId":5,"index":7,"type":3,"option":10,"title":"条件分支","sequence":[5],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"7","value":"","code":"return document.evaluate(\"./td[5]\", arguments[0], null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText.indexOf(\"10\") >= 0","waitTime":0},"position":0},{"id":7,"parentId":5,"index":8,"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}]} \ No newline at end of file diff --git a/Releases/EasySpider_windows_amd64/execution_instances/4.json b/Releases/EasySpider_windows_amd64/execution_instances/4.json new file mode 100644 index 0000000..b34d43f --- /dev/null +++ b/Releases/EasySpider_windows_amd64/execution_instances/4.json @@ -0,0 +1 @@ +{"id":4,"name":"地震台网判断案例","url":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","create_time":"5/20/2023, 7:54:57 PM","containJudge":true,"desc":"http://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"http://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"http://www.ceic.ac.cn/history"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"string","exampleValue":"1","value":"1"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"2.8"},{"id":1,"name":"参数2_文本","desc":"","type":"string","exampleValue":"2023-05-2011:51:38"},{"id":2,"name":"参数3_文本","desc":"","type":"string","exampleValue":"24.97"},{"id":3,"name":"参数4_文本","desc":"","type":"string","exampleValue":"99.26"},{"id":4,"name":"参数5_文本","desc":"","type":"string","exampleValue":"10"},{"id":5,"name":"参数6_链接文本","desc":"","type":"string","exampleValue":"云南保山市隆阳区"},{"id":6,"name":"参数7_链接地址","desc":"","type":"string","exampleValue":"https://news.ceic.ac.cn/CD20230520115138.html"},{"id":7,"name":"参数8_文本","desc":"","type":"string","exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"string","exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"string","exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"string","exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"string","exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"string","exampleValue":"参考位置"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3,4],"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":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"weidu1\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"value":"1","allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']"]}},{"id":8,"index":5,"parentId":6,"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":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '2.8')]"],"exampleValues":[{"num":0,"value":"2.8"},{"num":2,"value":"2.9"},{"num":3,"value":"5.7"},{"num":4,"value":"3.2"},{"num":5,"value":"3.9"},{"num":6,"value":"6.4"},{"num":7,"value":"4.5"},{"num":8,"value":"3.0"},{"num":9,"value":"5.5"},{"num":10,"value":"3.0"},{"num":11,"value":"5.3"},{"num":12,"value":"5.5"},{"num":13,"value":"4.0"},{"num":14,"value":"3.0"},{"num":15,"value":"4.2"},{"num":16,"value":"4.5"},{"num":17,"value":"5.9"},{"num":18,"value":"3.6"},{"num":19,"value":"3.3"},{"num":20,"value":"3.1"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-05-20')]"],"exampleValues":[{"num":0,"value":"2023-05-2011:51:38"},{"num":2,"value":"2023-05-2009:03:26"},{"num":3,"value":"2023-05-1923:15:03"},{"num":4,"value":"2023-05-1918:26:43"},{"num":5,"value":"2023-05-1905:18:32"},{"num":6,"value":"2023-05-1807:02:01"},{"num":7,"value":"2023-05-1705:56:23"},{"num":8,"value":"2023-05-1619:28:37"},{"num":9,"value":"2023-05-1418:11:34"},{"num":10,"value":"2023-05-1416:49:13"},{"num":11,"value":"2023-05-1416:21:42"},{"num":12,"value":"2023-05-1207:19:45"},{"num":13,"value":"2023-05-1206:07:18"},{"num":14,"value":"2023-05-1204:49:57"},{"num":15,"value":"2023-05-1204:32:10"},{"num":16,"value":"2023-05-1202:34:04"},{"num":17,"value":"2023-05-1121:33:11"},{"num":18,"value":"2023-05-1008:38:11"},{"num":19,"value":"2023-05-0919:23:29"},{"num":20,"value":"2023-05-0918:22:15"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '24.97')]"],"exampleValues":[{"num":0,"value":"24.97"},{"num":2,"value":"34.26"},{"num":3,"value":"12.75"},{"num":4,"value":"41.31"},{"num":5,"value":"33.48"},{"num":6,"value":"15.10"},{"num":7,"value":"42.78"},{"num":8,"value":"28.08"},{"num":9,"value":"33.60"},{"num":10,"value":"38.14"},{"num":11,"value":"33.35"},{"num":12,"value":"40.25"},{"num":13,"value":"29.62"},{"num":14,"value":"29.66"},{"num":15,"value":"29.63"},{"num":16,"value":"29.64"},{"num":17,"value":"24.00"},{"num":18,"value":"28.11"},{"num":19,"value":"41.20"},{"num":20,"value":"35.78"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '99.26')]"],"exampleValues":[{"num":0,"value":"99.26"},{"num":2,"value":"113.66"},{"num":3,"value":"49.00"},{"num":4,"value":"84.03"},{"num":5,"value":"91.05"},{"num":6,"value":"-90.90"},{"num":7,"value":"80.59"},{"num":8,"value":"105.12"},{"num":9,"value":"139.45"},{"num":10,"value":"75.66"},{"num":11,"value":"139.40"},{"num":12,"value":"-120.90"},{"num":13,"value":"102.03"},{"num":14,"value":"102.01"},{"num":15,"value":"102.02"},{"num":16,"value":"102.04"},{"num":17,"value":"125.40"},{"num":18,"value":"105.09"},{"num":19,"value":"83.28"},{"num":20,"value":"79.81"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '10')]"],"exampleValues":[{"num":0,"value":"10"},{"num":2,"value":"10"},{"num":3,"value":"10"},{"num":4,"value":"10"},{"num":5,"value":"10"},{"num":6,"value":"250"},{"num":7,"value":"10"},{"num":8,"value":"10"},{"num":9,"value":"10"},{"num":10,"value":"118"},{"num":11,"value":"10"},{"num":12,"value":"10"},{"num":13,"value":"10"},{"num":14,"value":"9"},{"num":15,"value":"10"},{"num":16,"value":"10"},{"num":17,"value":"10"},{"num":18,"value":"8"},{"num":19,"value":"15"},{"num":20,"value":"10"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"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":"美国加利福尼亚州"},{"num":13,"value":"四川甘孜州泸定县"},{"num":14,"value":"四川甘孜州泸定县"},{"num":15,"value":"四川甘孜州泸定县"},{"num":16,"value":"四川甘孜州泸定县"},{"num":17,"value":"琉球群岛"},{"num":18,"value":"四川宜宾市兴文县"},{"num":19,"value":"新疆阿克苏地区库车市"},{"num":20,"value":"新疆和田地区和田县"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CD20230520115138.html"},{"num":2,"value":"https://news.ceic.ac.cn/CD20230520090326.html"},{"num":3,"value":"https://news.ceic.ac.cn/CC20230519231504.html"},{"num":4,"value":"https://news.ceic.ac.cn/CD20230519182644.html"},{"num":5,"value":"https://news.ceic.ac.cn/CD20230519051833.html"},{"num":6,"value":"https://news.ceic.ac.cn/CC20230518070201.html"},{"num":7,"value":"https://news.ceic.ac.cn/CD20230517055623.html"},{"num":8,"value":"https://news.ceic.ac.cn/CD20230516192837.html"},{"num":9,"value":"https://news.ceic.ac.cn/CC20230514181134.html"},{"num":10,"value":"https://news.ceic.ac.cn/CD20230514164913.html"},{"num":11,"value":"https://news.ceic.ac.cn/CC20230514162142.html"},{"num":12,"value":"https://news.ceic.ac.cn/CC20230512071946.html"},{"num":13,"value":"https://news.ceic.ac.cn/CC20230512060719.html"},{"num":14,"value":"https://news.ceic.ac.cn/CD20230512044957.html"},{"num":15,"value":"https://news.ceic.ac.cn/CC20230512043211.html"},{"num":16,"value":"https://news.ceic.ac.cn/CC20230512023404.html"},{"num":17,"value":"https://news.ceic.ac.cn/CC20230511213311.html"},{"num":18,"value":"https://news.ceic.ac.cn/CC20230510083811.html"},{"num":19,"value":"https://news.ceic.ac.cn/CD20230509192329.html"},{"num":20,"value":"https://news.ceic.ac.cn/CD20230509182216.html"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]"],"exampleValues":[{"num":1,"value":"参考位置"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0}],"loopType":1}},{"id":5,"index":6,"parentId":4,"type":2,"option":9,"title":"判断条件","sequence":[7,8],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":6,"parentId":5,"index":7,"type":3,"option":10,"title":"条件分支 - 表格中第五项包括字符串","sequence":[5],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"7","value":"","code":"return document.evaluate(\"./td[5]\", arguments[0], null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText.indexOf(\"5\") >= 0","waitTime":0},"position":0},{"id":7,"parentId":5,"index":8,"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}]} \ No newline at end of file diff --git a/Releases/EasySpider_windows_amd64/tasks/49.json b/Releases/EasySpider_windows_amd64/tasks/49.json new file mode 100644 index 0000000..2511070 --- /dev/null +++ b/Releases/EasySpider_windows_amd64/tasks/49.json @@ -0,0 +1 @@ +{"id":49,"name":"地震台网判断案例","url":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","create_time":"5/20/2023, 7:54:57 PM","containJudge":true,"desc":"http://www.ceic.ac.cn/history","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"http://www.ceic.ac.cn/history","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"http://www.ceic.ac.cn/history"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"string","exampleValue":"1","value":"1"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"2.8"},{"id":1,"name":"参数2_文本","desc":"","type":"string","exampleValue":"2023-05-2011:51:38"},{"id":2,"name":"参数3_文本","desc":"","type":"string","exampleValue":"24.97"},{"id":3,"name":"参数4_文本","desc":"","type":"string","exampleValue":"99.26"},{"id":4,"name":"参数5_文本","desc":"","type":"string","exampleValue":"10"},{"id":5,"name":"参数6_链接文本","desc":"","type":"string","exampleValue":"云南保山市隆阳区"},{"id":6,"name":"参数7_链接地址","desc":"","type":"string","exampleValue":"https://news.ceic.ac.cn/CD20230520115138.html"},{"id":7,"name":"参数8_文本","desc":"","type":"string","exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"string","exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"string","exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"string","exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"string","exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"string","exampleValue":"参考位置"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3,4],"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":"http://www.ceic.ac.cn/history","links":"http://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":0,"option":4,"title":"输入文字","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"weidu1\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"value":"1","allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]","//input[contains(., '')]","id(\"weidu1\")","//INPUT[@class='span1']","//INPUT[@name='weidu1']"]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[@id=\"search\"]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]","//a[contains(., '查询')]","id(\"search\")","//A[@class='check']"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]","//tr[contains(., '震级(M)发震时刻(')]","//TR[@class='speed-tr-h1']"]}},{"id":8,"index":5,"parentId":6,"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":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '2.8')]"],"exampleValues":[{"num":0,"value":"2.8"},{"num":2,"value":"2.9"},{"num":3,"value":"5.7"},{"num":4,"value":"3.2"},{"num":5,"value":"3.9"},{"num":6,"value":"6.4"},{"num":7,"value":"4.5"},{"num":8,"value":"3.0"},{"num":9,"value":"5.5"},{"num":10,"value":"3.0"},{"num":11,"value":"5.3"},{"num":12,"value":"5.5"},{"num":13,"value":"4.0"},{"num":14,"value":"3.0"},{"num":15,"value":"4.2"},{"num":16,"value":"4.5"},{"num":17,"value":"5.9"},{"num":18,"value":"3.6"},{"num":19,"value":"3.3"},{"num":20,"value":"3.1"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-05-20')]"],"exampleValues":[{"num":0,"value":"2023-05-2011:51:38"},{"num":2,"value":"2023-05-2009:03:26"},{"num":3,"value":"2023-05-1923:15:03"},{"num":4,"value":"2023-05-1918:26:43"},{"num":5,"value":"2023-05-1905:18:32"},{"num":6,"value":"2023-05-1807:02:01"},{"num":7,"value":"2023-05-1705:56:23"},{"num":8,"value":"2023-05-1619:28:37"},{"num":9,"value":"2023-05-1418:11:34"},{"num":10,"value":"2023-05-1416:49:13"},{"num":11,"value":"2023-05-1416:21:42"},{"num":12,"value":"2023-05-1207:19:45"},{"num":13,"value":"2023-05-1206:07:18"},{"num":14,"value":"2023-05-1204:49:57"},{"num":15,"value":"2023-05-1204:32:10"},{"num":16,"value":"2023-05-1202:34:04"},{"num":17,"value":"2023-05-1121:33:11"},{"num":18,"value":"2023-05-1008:38:11"},{"num":19,"value":"2023-05-0919:23:29"},{"num":20,"value":"2023-05-0918:22:15"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '24.97')]"],"exampleValues":[{"num":0,"value":"24.97"},{"num":2,"value":"34.26"},{"num":3,"value":"12.75"},{"num":4,"value":"41.31"},{"num":5,"value":"33.48"},{"num":6,"value":"15.10"},{"num":7,"value":"42.78"},{"num":8,"value":"28.08"},{"num":9,"value":"33.60"},{"num":10,"value":"38.14"},{"num":11,"value":"33.35"},{"num":12,"value":"40.25"},{"num":13,"value":"29.62"},{"num":14,"value":"29.66"},{"num":15,"value":"29.63"},{"num":16,"value":"29.64"},{"num":17,"value":"24.00"},{"num":18,"value":"28.11"},{"num":19,"value":"41.20"},{"num":20,"value":"35.78"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '99.26')]"],"exampleValues":[{"num":0,"value":"99.26"},{"num":2,"value":"113.66"},{"num":3,"value":"49.00"},{"num":4,"value":"84.03"},{"num":5,"value":"91.05"},{"num":6,"value":"-90.90"},{"num":7,"value":"80.59"},{"num":8,"value":"105.12"},{"num":9,"value":"139.45"},{"num":10,"value":"75.66"},{"num":11,"value":"139.40"},{"num":12,"value":"-120.90"},{"num":13,"value":"102.03"},{"num":14,"value":"102.01"},{"num":15,"value":"102.02"},{"num":16,"value":"102.04"},{"num":17,"value":"125.40"},{"num":18,"value":"105.09"},{"num":19,"value":"83.28"},{"num":20,"value":"79.81"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '10')]"],"exampleValues":[{"num":0,"value":"10"},{"num":2,"value":"10"},{"num":3,"value":"10"},{"num":4,"value":"10"},{"num":5,"value":"10"},{"num":6,"value":"250"},{"num":7,"value":"10"},{"num":8,"value":"10"},{"num":9,"value":"10"},{"num":10,"value":"118"},{"num":11,"value":"10"},{"num":12,"value":"10"},{"num":13,"value":"10"},{"num":14,"value":"9"},{"num":15,"value":"10"},{"num":16,"value":"10"},{"num":17,"value":"10"},{"num":18,"value":"8"},{"num":19,"value":"15"},{"num":20,"value":"10"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"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":"美国加利福尼亚州"},{"num":13,"value":"四川甘孜州泸定县"},{"num":14,"value":"四川甘孜州泸定县"},{"num":15,"value":"四川甘孜州泸定县"},{"num":16,"value":"四川甘孜州泸定县"},{"num":17,"value":"琉球群岛"},{"num":18,"value":"四川宜宾市兴文县"},{"num":19,"value":"新疆阿克苏地区库车市"},{"num":20,"value":"新疆和田地区和田县"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '云南保山市隆阳区')]","id(\"cid\")"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CD20230520115138.html"},{"num":2,"value":"https://news.ceic.ac.cn/CD20230520090326.html"},{"num":3,"value":"https://news.ceic.ac.cn/CC20230519231504.html"},{"num":4,"value":"https://news.ceic.ac.cn/CD20230519182644.html"},{"num":5,"value":"https://news.ceic.ac.cn/CD20230519051833.html"},{"num":6,"value":"https://news.ceic.ac.cn/CC20230518070201.html"},{"num":7,"value":"https://news.ceic.ac.cn/CD20230517055623.html"},{"num":8,"value":"https://news.ceic.ac.cn/CD20230516192837.html"},{"num":9,"value":"https://news.ceic.ac.cn/CC20230514181134.html"},{"num":10,"value":"https://news.ceic.ac.cn/CD20230514164913.html"},{"num":11,"value":"https://news.ceic.ac.cn/CC20230514162142.html"},{"num":12,"value":"https://news.ceic.ac.cn/CC20230512071946.html"},{"num":13,"value":"https://news.ceic.ac.cn/CC20230512060719.html"},{"num":14,"value":"https://news.ceic.ac.cn/CD20230512044957.html"},{"num":15,"value":"https://news.ceic.ac.cn/CC20230512043211.html"},{"num":16,"value":"https://news.ceic.ac.cn/CC20230512023404.html"},{"num":17,"value":"https://news.ceic.ac.cn/CC20230511213311.html"},{"num":18,"value":"https://news.ceic.ac.cn/CC20230510083811.html"},{"num":19,"value":"https://news.ceic.ac.cn/CD20230509192329.html"},{"num":20,"value":"https://news.ceic.ac.cn/CD20230509182216.html"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]"],"exampleValues":[{"num":1,"value":"参考位置"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0}],"loopType":1}},{"id":5,"index":6,"parentId":4,"type":2,"option":9,"title":"判断条件","sequence":[7,8],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":6,"parentId":5,"index":7,"type":3,"option":10,"title":"条件分支 - 表格中第五项包括字符串","sequence":[5],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"7","value":"","code":"return document.evaluate(\"./td[5]\", arguments[0], null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText.indexOf(\"5\") >= 0","waitTime":0},"position":0},{"id":7,"parentId":5,"index":8,"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}]} \ No newline at end of file