From 6096fb46c39efb1c6417ed555daa25fb7423dd46 Mon Sep 17 00:00:00 2001 From: naibo Date: Fri, 19 May 2023 04:26:44 +0800 Subject: [PATCH] Version 0.3.0 Beta --- .DS_Store | Bin 10244 -> 0 bytes ElectronJS/execution_instances/0.json | 2 +- ElectronJS/src/taskGrid/FlowChart_CN.html | 20 +- ElectronJS/src/taskGrid/FlowChart_CN.js | 4 +- ElectronJS/src/taskGrid/invokeTask.html | 4 +- ElectronJS/src/taskGrid/logic_CN.js | 16 +- ElectronJS/tasks/52.json | 1 + ElectronJS/tasks/53.json | 162 ++++++++++++++ ExecuteStage/easyspider_executestage.py | 9 +- Readme.md | 37 ++-- Releases/EasySpider_windows_amd64/config.json | 2 +- .../execution_instances/0.json | 2 +- .../execution_instances/1.json | 1 - .../EasySpider_windows_amd64/tasks/11.json | 1 - .../EasySpider_windows_amd64/tasks/15.json | 1 - .../EasySpider_windows_amd64/tasks/16.json | 1 - .../EasySpider_windows_amd64/tasks/17.json | 1 - .../EasySpider_windows_amd64/tasks/19.json | 1 - .../EasySpider_windows_amd64/tasks/2.json | 1 - .../EasySpider_windows_amd64/tasks/20.json | 1 - .../EasySpider_windows_amd64/tasks/23.json | 1 - .../EasySpider_windows_amd64/tasks/25.json | 1 - .../EasySpider_windows_amd64/tasks/27.json | 1 - .../EasySpider_windows_amd64/tasks/28.json | 1 - .../EasySpider_windows_amd64/tasks/29.json | 1 - .../EasySpider_windows_amd64/tasks/30.json | 1 - .../EasySpider_windows_amd64/tasks/31.json | 1 - .../EasySpider_windows_amd64/tasks/32.json | 1 - .../EasySpider_windows_amd64/tasks/33.json | 1 - .../EasySpider_windows_amd64/tasks/34.json | 1 - .../EasySpider_windows_amd64/tasks/35.json | 1 - .../EasySpider_windows_amd64/tasks/36.json | 1 + .../EasySpider_windows_amd64/tasks/37.json | 1 + .../EasySpider_windows_amd64/tasks/38.json | 1 + .../EasySpider_windows_amd64/tasks/39.json | 1 + .../EasySpider_windows_amd64/tasks/4.json | 1 - .../EasySpider_windows_amd64/tasks/40.json | 197 ++++++++++++++++++ .../EasySpider_windows_amd64/tasks/41.json | 1 + .../EasySpider_windows_amd64/tasks/42.json | 1 + .../EasySpider_windows_amd64/tasks/43.json | 1 + .../EasySpider_windows_amd64/tasks/44.json | 1 + .../EasySpider_windows_amd64/tasks/45.json | 1 + .../EasySpider_windows_amd64/tasks/46.json | 1 + .../EasySpider_windows_amd64/tasks/47.json | 1 + .../EasySpider_windows_amd64/tasks/5.json | 1 - .../EasySpider_windows_amd64/tasks/6.json | 1 - .../EasySpider_windows_amd64/tasks/7.json | 1 - build.md | 3 - package-lock.json | 6 - 49 files changed, 424 insertions(+), 75 deletions(-) delete mode 100644 .DS_Store create mode 100644 ElectronJS/tasks/52.json create mode 100644 ElectronJS/tasks/53.json delete mode 100644 Releases/EasySpider_windows_amd64/execution_instances/1.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/11.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/15.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/16.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/17.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/19.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/2.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/20.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/23.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/25.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/27.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/28.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/29.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/30.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/31.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/32.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/33.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/34.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/35.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/36.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/37.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/38.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/39.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/4.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/40.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/41.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/42.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/43.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/44.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/45.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/46.json create mode 100644 Releases/EasySpider_windows_amd64/tasks/47.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/5.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/6.json delete mode 100644 Releases/EasySpider_windows_amd64/tasks/7.json delete mode 100644 build.md delete mode 100644 package-lock.json diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 7d2d9f41a3bedbbc88e3222ad6e222ca37df6365..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMYitx%6h3EK=nNfTTFO&4-CBeO3++OY0)pEYP$&<(Eqzd|vpYjObUIUaX14`W zQ)7HZ5{<9Km`Hs7#78tr48DGu_=={INFp(6qQ6Xh{K1HL?%dgCyKRw}m^3((%sq3@ zJ?GxJ-~G=FyP4AKCB0D%C32?W^pAxt-uQD2U6>3upV@wNaY^GWSp z^i2Bz&nN85s4vI3^jxV>~ z4jAP!NCN}{1g0Xu_U#ukhJ+WYK1RE0Iuzh}(-77hE z^Pq|9)XCC?Bzah{2V#?bFmx?G@nL7kZ|7`$$TS?cy81i{dHHkZ7KjC6p?D@ z)lE6|YVt74wb`~A&pfN~Lxw)wtCTd@ma7_;p7b0HO(&C{4#U#y;d(n|X^!U`;{~E5 zO1;YRlP7CxB9-AtZS81f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FB(L?^>^R;#dmx>E lKID~0eY-I(J$Lf++)47&{QvxCK(PO3M`XeN|9`yy{~Ltq%FX}) diff --git a/ElectronJS/execution_instances/0.json b/ElectronJS/execution_instances/0.json index 424b0a9..ce24df4 100644 --- a/ElectronJS/execution_instances/0.json +++ b/ElectronJS/execution_instances/0.json @@ -1 +1 @@ -{"id":0,"name":"新web采adsf","url":"https://www.jd.com","links":"https://www.jd.com","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"},{"id":1,"name":"inputText_1","nodeName":"提取数据","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"string","exampleValue":"赛跟","value":"赛跟"}],"outputParameters":[],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3],"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,"url":"https://www.jd.com","links":"https://www.jd.com","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=\"key\"]","wait":0,"value":"赛跟"}},{"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-btn\"]/i[1]","wait":0,"scrollType":0,"scrollCount":0,"paras":[]}}]} \ No newline at end of file +{"id":0,"name":"新web采集任务","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"5/19/2023, 2:14:39 AM","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":"自定义操作2","desc":"自定义操作返回的数据","type":"string","exampleValue":""},{"id":1,"name":"自定义操作","desc":"自定义操作返回的数据","type":"string","exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"url":"https://www.jd.com","links":"https://www.jd.com","scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,4],"isInLoop":false,"position":1,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":"5","pathList":"","textList":"","code":"dsaf","waitTime":0,"exitCount":0,"historyWait":2}},{"id":3,"index":3,"parentId":2,"type":0,"option":5,"title":"自定义操作2","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"codeMode":0,"code":"return window.innerHeight","waitTime":0,"recordASField":"1"}},{"id":4,"index":4,"parentId":2,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"codeMode":"1","code":"python D:/test.py","waitTime":0,"recordASField":"1"}}]} \ No newline at end of file diff --git a/ElectronJS/src/taskGrid/FlowChart_CN.html b/ElectronJS/src/taskGrid/FlowChart_CN.html index c6f97b1..92bedca 100644 --- a/ElectronJS/src/taskGrid/FlowChart_CN.html +++ b/ElectronJS/src/taskGrid/FlowChart_CN.html @@ -41,11 +41,11 @@ - + - - + +
-----------------
@@ -141,7 +141,7 @@
+ placeholder='该元素用arguments[0]来表示,示例JS代码:arguments[0].innerText = arguments[0].innerText.replace("上海","Shanghai")即实现了将元素文字中所有的“上海”替换成”Shanghai“的功能,然后后续如提取数据时就会提取到替换后的值。' v-model='nowNode["parameters"]["beforeJS"]'> @@ -195,7 +195,7 @@
+ placeholder='该元素用arguments[0]来表示,示例JS代码:arguments[0].innerText = arguments[0].innerText.replace("上海","Shanghai")即实现了将元素文字中所有的“上海”替换成”Shanghai“的功能,然后后续如提取数据时就会提取到替换后的值。' v-model='paras.parameters[paraIndex]["beforeJS"]'> @@ -269,7 +269,7 @@
+ placeholder='该元素用arguments[0]来表示,示例JS代码:arguments[0].innerText = arguments[0].innerText.replace("上海","Shanghai")即实现了将元素文字中所有的“上海”替换成”Shanghai“的功能,然后后续如提取数据时就会提取到替换后的值。' v-model='nowNode["parameters"]["beforeJS"]'> @@ -289,8 +289,12 @@
- -

将执行后的输出/返回值作为字段记录

+ +

是否将执行后的输出/返回值作为字段记录:

+

diff --git a/ElectronJS/src/taskGrid/FlowChart_CN.js b/ElectronJS/src/taskGrid/FlowChart_CN.js index de6bcf1..7cdfbbd 100644 --- a/ElectronJS/src/taskGrid/FlowChart_CN.js +++ b/ElectronJS/src/taskGrid/FlowChart_CN.js @@ -552,12 +552,12 @@ document.onkeydown = function(e) { deleteElement(); } } else { //ctrl+s保存服务 - var currKey = 0, + let currKey = 0, e = e || event || window.event; currKey = e.keyCode || e.which || e.charCode; if (currKey == 83 && (e.ctrlKey || e.metaKey)) { $('#save').click(); - return false; + return true; } } diff --git a/ElectronJS/src/taskGrid/invokeTask.html b/ElectronJS/src/taskGrid/invokeTask.html index c9e1ced..4965035 100644 --- a/ElectronJS/src/taskGrid/invokeTask.html +++ b/ElectronJS/src/taskGrid/invokeTask.html @@ -52,7 +52,7 @@ +{{command}} --config_folder "{{config_folder}}" --headless 0 --read_type remote --config_file_name config.json --saved_file_name