Browse Source

Update Loop IF condition instruction

pull/108/head
naibo 1 year ago
parent
commit
40dd3e64df
11 changed files with 11 additions and 4 deletions
  1. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/16.json
  2. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/17.json
  3. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/18.json
  4. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/19.json
  5. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/20.json
  6. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/21.json
  7. +1
    -1
      .temp_to_pub/EasySpider_windows_x64/tasks/37.json
  8. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/tasks/38.json
  9. +1
    -1
      ElectronJS/src/taskGrid/FlowChart.html
  10. +1
    -1
      ElectronJS/src/taskGrid/FlowChart_CN.html
  11. +1
    -1
      ExecuteStage/.vscode/launch.json

+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/16.json View File

@ -0,0 +1 @@
{"id":16,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"6/11/2023, 4:47:44 PM","version":"0.3.2","containJudge":true,"desc":"https://www.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"https://www.jd.com"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"/手机/数码"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"url":"https://www.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[4],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","//div[contains(., '/手机/数码')]","//DIV[@class='LeftSide_menu_item__SBMWC LeftSide_text_space__2UhbG ']"]}},{"id":5,"index":3,"parentId":4,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"paras":[{"nodeType":0,"contentType":0,"relative":true,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"","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":"/图书/童书/文学"}],"unique_index":"ypeq5svi5elir6lewy","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":3,"index":4,"parentId":2,"type":2,"option":9,"title":"判断条件","sequence":[5],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":4,"parentId":3,"index":5,"type":3,"option":10,"title":"条件分支","sequence":[3],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"4","value":"/a[3]","code":"","waitTime":0},"position":0},{"id":-1,"parentId":4,"index":6,"type":3,"option":10,"title":"条件分支","sequence":[],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":0,"value":"","code":"","waitTime":0},"position":1},{"index":7,"id":-1,"parentId":3,"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":0}]}

+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/17.json
File diff suppressed because it is too large
View File


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/18.json
File diff suppressed because it is too large
View File


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/19.json
File diff suppressed because it is too large
View File


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/20.json
File diff suppressed because it is too large
View File


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/21.json
File diff suppressed because it is too large
View File


+ 1
- 1
.temp_to_pub/EasySpider_windows_x64/tasks/37.json
File diff suppressed because it is too large
View File


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/tasks/38.json View File

@ -0,0 +1 @@
{"id":38,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"6/11/2023, 4:47:44 PM","version":"0.3.2","containJudge":true,"desc":"https://www.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"https://www.jd.com"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"string","exampleValue":"/手机/数码"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"url":"https://www.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[4],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","//div[contains(., '/手机/数码')]","//DIV[@class='LeftSide_menu_item__SBMWC LeftSide_text_space__2UhbG ']"]}},{"id":5,"index":3,"parentId":4,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"paras":[{"nodeType":0,"contentType":0,"relative":true,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"","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":"/图书/童书/文学"}],"unique_index":"ypeq5svi5elir6lewy","default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":3,"index":4,"parentId":2,"type":2,"option":9,"title":"判断条件","sequence":[5],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0}},{"id":4,"parentId":3,"index":5,"type":3,"option":10,"title":"条件分支","sequence":[3],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":"4","value":"/a[3]","code":"","waitTime":0},"position":0},{"id":-1,"parentId":4,"index":6,"type":3,"option":10,"title":"条件分支","sequence":[],"isInLoop":true,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"class":0,"value":"","code":"","waitTime":0},"position":1},{"index":7,"id":-1,"parentId":3,"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":0}]}

+ 1
- 1
ElectronJS/src/taskGrid/FlowChart.html View File

@ -441,7 +441,7 @@
</select>
<div v-if='TClass > 0 && TClass < 5'>
<label>Text/Element XPath to Include: <span style="font-size: 30px!important;" title="Relative XPath syntax: starts with /, e.g., if the XPath of the loop item is /html/body/div[1], and you input /*[@id='tab-customer'], the final XPath will be: /html/body/div[1]/*[@id='tab-customer']"></span></label>
<textarea onkeydown="inputDelete(event)" required placeholder="If the current loop contains elements, input the xpath of the relative element (such as /div[2]/div[1]/img, or /div[2]//img, but direct usage of //img is not supported, meaning it's not allowed to set // as the relative XPATH directly. However, it's possible to set the descendants' path as a relative path following the first child's absolute path)." class="form-control" rows="3" v-model='nowNode["parameters"]["value"]'></textarea>
<textarea onkeydown="inputDelete(event)" required placeholder="If the current loop contains elements, input the xpath of the relative element (such as '/div[2]/div[1]/img', if written in relative path, it should be written as '/*//img', which means checking whether there exists an 'img' tag among all the descendant elements of the current loop item.)." class="form-control" rows="3" v-model='nowNode["parameters"]["value"]'></textarea>
</div>
<div v-else-if='TClass > 0 && TClass < 7'>
<label>Code/Script Content: </label>

+ 1
- 1
ElectronJS/src/taskGrid/FlowChart_CN.html View File

@ -441,7 +441,7 @@
</select>
<div v-if='TClass>0 && TClass <5'>
<label>包含的文字/元素XPATH: <span style="font-size: 30px!important;" title="相对XPATH写法:以/开头,如循环项XPATH为/html/body/div[1],您的输入为/*[@id='tab-customer'],则最终寻址的xpath为:/html/body/div[1]/*[@id='tab-customer']"></span></label>
<textarea onkeydown="inputDelete(event)" required placeholder="如果是当前循环包含元素,则输入相对元素的xpath(如/div[2]/div[1]/img,或/div[2]//img,但不支持直接写//img,即不能直接设置为//这种相对XPATH,但可以在第一个子元素绝对路径后设置后面子孙元素为相对路径)。" class="form-control" rows="3" v-model='nowNode["parameters"]["value"]'></textarea>
<textarea onkeydown="inputDelete(event)" required placeholder="如果是当前循环包含元素,则输入相对元素的xpath(如/div[2]/div[1]/img,如果写相对路径,需要写成/*//img,即检测当前循环项所有的子孙元素是否存在img标签)。" class="form-control" rows="3" v-model='nowNode["parameters"]["value"]'></textarea>
</div>
<div v-else-if='TClass > 0 && TClass < 7'>
<label>代码/脚本内容: </label>

+ 1
- 1
ExecuteStage/.vscode/launch.json View File

@ -12,7 +12,7 @@
"console": "integratedTerminal",
"justMyCode": true,
// "args": ["--id", "38", "--read_type", "local", "--headless", "1"]
"args": ["--id", "[15]", "--headless", "0", "--user_data", "0"]
"args": ["--id", "[17]", "--headless", "0", "--user_data", "0"]
}
]
}

Loading…
Cancel
Save