diff --git a/.temp_to_pub/EasySpider_windows_x64/execution_instances/145.json b/.temp_to_pub/EasySpider_windows_x64/execution_instances/145.json new file mode 100644 index 0000000..a096700 --- /dev/null +++ b/.temp_to_pub/EasySpider_windows_x64/execution_instances/145.json @@ -0,0 +1 @@ +{"id":145,"name":"Dynamic Iframe","url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","create_time":"12/8/2023, 5:40:46 AM","update_time":"12/8/2023, 5:40:46 AM","version":"0.5.0","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://easyspider.cn/test_pages/iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/iframe.html"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"12","value":"12"},{"id":2,"name":"loopTimes_循环_2","nodeId":4,"nodeName":"循环","desc":"循环循环执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"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\"]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"12","index":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"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\"]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[10]/a[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":6,"index":5,"parentId":4,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":5,"index":6,"parentId":4,"type":1,"option":8,"title":"循环","sequence":[7],"isInLoop":true,"position":0,"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","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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[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']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":7,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_windows_x64/execution_instances/146.json b/.temp_to_pub/EasySpider_windows_x64/execution_instances/146.json new file mode 100644 index 0000000..5de6efc --- /dev/null +++ b/.temp_to_pub/EasySpider_windows_x64/execution_instances/146.json @@ -0,0 +1 @@ +{"id":146,"name":"Dynamic Iframe","url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","create_time":"12/8/2023, 5:40:46 AM","update_time":"12/8/2023, 5:40:46 AM","version":"0.5.0","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://easyspider.cn/test_pages/iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/iframe.html"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"12","value":"12"},{"id":2,"name":"loopTimes_循环_2","nodeId":4,"nodeName":"循环","desc":"循环循环执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"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\"]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"12","index":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"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\"]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[10]/a[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":6,"index":5,"parentId":4,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":5,"index":6,"parentId":4,"type":1,"option":8,"title":"循环","sequence":[7],"isInLoop":true,"position":0,"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","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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[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']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":7,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_windows_x64/execution_instances/147.json b/.temp_to_pub/EasySpider_windows_x64/execution_instances/147.json new file mode 100644 index 0000000..4ba3241 --- /dev/null +++ b/.temp_to_pub/EasySpider_windows_x64/execution_instances/147.json @@ -0,0 +1 @@ +{"id":147,"name":"Dynamic Iframe","url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","create_time":"12/8/2023, 5:40:46 AM","update_time":"12/8/2023, 5:42:04 AM","version":"0.5.0","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://easyspider.cn/test_pages/iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/iframe.html"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"12","value":"12"},{"id":2,"name":"loopTimes_循环_2","nodeId":4,"nodeName":"循环","desc":"循环循环执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"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\"]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"12","index":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"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\"]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[10]/a[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":6,"index":5,"parentId":4,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":1,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":5,"index":6,"parentId":4,"type":1,"option":8,"title":"循环","sequence":[7],"isInLoop":true,"position":0,"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","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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[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']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":7,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_windows_x64/execution_instances/148.json b/.temp_to_pub/EasySpider_windows_x64/execution_instances/148.json new file mode 100644 index 0000000..f922aef --- /dev/null +++ b/.temp_to_pub/EasySpider_windows_x64/execution_instances/148.json @@ -0,0 +1 @@ +{"id":148,"name":"Dynamic Iframe","url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","create_time":"12/8/2023, 5:40:46 AM","update_time":"12/8/2023, 5:42:04 AM","version":"0.5.0","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://easyspider.cn/test_pages/iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/iframe.html"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"12","value":"12"},{"id":2,"name":"loopTimes_循环_2","nodeId":4,"nodeName":"循环","desc":"循环循环执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"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\"]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"12","index":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"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\"]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[10]/a[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":6,"index":5,"parentId":4,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":1,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":5,"index":6,"parentId":4,"type":1,"option":8,"title":"循环","sequence":[7],"isInLoop":true,"position":0,"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","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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[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']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":7,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_windows_x64/execution_instances/149.json b/.temp_to_pub/EasySpider_windows_x64/execution_instances/149.json new file mode 100644 index 0000000..16e01db --- /dev/null +++ b/.temp_to_pub/EasySpider_windows_x64/execution_instances/149.json @@ -0,0 +1 @@ +{"id":149,"name":"Dynamic Iframe","url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html?address=https://www.ceic.ac.cn/history","create_time":"12/8/2023, 5:40:46 AM","update_time":"12/8/2023, 5:42:04 AM","version":"0.5.0","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://easyspider.cn/test_pages/iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/iframe.html"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"12","value":"12"},{"id":2,"name":"loopTimes_循环_2","nodeId":4,"nodeName":"循环","desc":"循环循环执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html?address=https://www.ceic.ac.cn/history","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"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\"]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"12","index":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"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\"]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[10]/a[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":6,"index":5,"parentId":4,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":1,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":5,"index":6,"parentId":4,"type":1,"option":8,"title":"循环","sequence":[7],"isInLoop":true,"position":0,"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","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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[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']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":7,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/.temp_to_pub/EasySpider_windows_x64/tasks/238.json b/.temp_to_pub/EasySpider_windows_x64/tasks/238.json new file mode 100644 index 0000000..cfe926c --- /dev/null +++ b/.temp_to_pub/EasySpider_windows_x64/tasks/238.json @@ -0,0 +1 @@ +{"id":238,"name":"Dynamic Iframe","url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","create_time":"12/8/2023, 5:40:46 AM","update_time":"12/8/2023, 5:42:04 AM","version":"0.5.0","saveThreshold":10,"cloudflare":0,"environment":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"containJudge":false,"desc":"https://easyspider.cn/test_pages/iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/iframe.html"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"12","value":"12"},{"id":2,"name":"loopTimes_循环_2","nodeId":4,"nodeName":"循环","desc":"循环循环执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"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\"]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"12","index":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"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\"]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[6,5],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[10]/a[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":6,"index":5,"parentId":4,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":1,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":5,"index":6,"parentId":4,"type":1,"option":8,"title":"循环","sequence":[7],"isInLoop":true,"position":0,"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","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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[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']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":7,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/ElectronJS/tasks/230.json b/ElectronJS/tasks/230.json new file mode 100644 index 0000000..755cac3 --- /dev/null +++ b/ElectronJS/tasks/230.json @@ -0,0 +1 @@ +{"id":230,"name":"多层嵌套iframe示例 - 主页面","url":"https://easyspider.cn/test_pages/nested_iframe.html","links":"https://easyspider.cn/test_pages/nested_iframe.html","create_time":"12/8/2023, 3:48:34 AM","update_time":"12/8/2023, 5:06:34 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"desc":"https://easyspider.cn/test_pages/nested_iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/nested_iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/nested_iframe.html"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是主页面"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是第一层嵌套页面"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/nested_iframe.html","links":"https://easyspider.cn/test_pages/nested_iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h1[1]","allXPaths":["/html/body/h1[1]","//h1[contains(., '这是主页面')]","/html/body/h1"],"exampleValues":[{"num":0,"value":"这是主页面"}],"unique_index":"c61bxpv7felpvm1u1j","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数2_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h2[1]","allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"],"exampleValues":[{"num":0,"value":"这是第一层嵌套页面"}],"unique_index":"io61iajn9h7lpvm1wbp","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数3_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h3[1]","allXPaths":["/html/body/h3[1]","//h3[contains(., '这是第二层嵌套页面')]","/html/body/h3"],"exampleValues":[{"num":0,"value":"这是第二层嵌套页面"}],"unique_index":"3jhqkc33etglpvm1z9v","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":3,"index":3,"parentId":0,"type":0,"option":2,"title":"点击这是主页面","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/h1[1]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"alertHandleType":0,"allXPaths":["/html/body/h1[1]","//h1[contains(., '这是主页面')]","/html/body/h1"]}},{"id":4,"index":4,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":3,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h3[1]","allXPaths":["/html/body/h3[1]","//h3[contains(., '这是第二层嵌套页面')]","/html/body/h3"],"exampleValues":[{"num":0,"value":"这是第二层嵌套页面"}],"unique_index":"ksdtgc5d4rlpvn5ihd","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数2_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h2[1]","allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"],"exampleValues":[{"num":0,"value":"这是第一层嵌套页面"}],"unique_index":"p3fjzfrj7e8lpvn5ozn","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数3_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h1[1]","allXPaths":["/html/body/h1[1]","//h1[contains(., '这是主页面')]","/html/body/h1"],"exampleValues":[{"num":0,"value":"这是主页面"}],"unique_index":"ixtq9u2yf5rlpvn5sny","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}}]} \ No newline at end of file diff --git a/ElectronJS/tasks/231.json b/ElectronJS/tasks/231.json new file mode 100644 index 0000000..5c936f9 --- /dev/null +++ b/ElectronJS/tasks/231.json @@ -0,0 +1 @@ +{"id":231,"name":"多层嵌套iframe示例 - 主页面","url":"https://easyspider.cn/test_pages/nested_iframe.html","links":"https://easyspider.cn/test_pages/nested_iframe.html","create_time":"12/8/2023, 5:08:20 AM","update_time":"12/8/2023, 5:10:31 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"desc":"https://easyspider.cn/test_pages/nested_iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/nested_iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/nested_iframe.html"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是主页面"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"IFRAME MAIN。"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是第一层嵌套页面"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是第二层嵌套页面"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是第二层嵌套页面的内容"},{"id":5,"name":"参数3_文本1","desc":"","type":"text","recordASField":1,"exampleValue":"这是第一层嵌套页面"},{"id":6,"name":"参数4_文本1","desc":"","type":"text","recordASField":1,"exampleValue":"这是第二层嵌套页面"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2,3,5,6,8,9],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/nested_iframe.html","links":"https://easyspider.cn/test_pages/nested_iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":2,"index":2,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h1[1]","allXPaths":["/html/body/h1[1]","//h1[contains(., '这是主页面')]","/html/body/h1"],"exampleValues":[{"num":0,"value":"这是主页面"}],"unique_index":"mzwovstl8glpvovrrn","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":3,"index":3,"parentId":0,"type":1,"option":8,"title":"循环采集数据","sequence":[4],"isInLoop":false,"position":2,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/p","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/p[1]","//p[contains(., 'IFRAME MAI')]","/html/body/p[last()-3]"]}},{"id":8,"index":4,"parentId":3,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":true,"name":"参数2_文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"IFRAME MAIN。"}],"unique_index":"fk8mg8xx7dplpvovulf","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":4,"index":5,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":3,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数3_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h2[1]","allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"],"exampleValues":[{"num":0,"value":"这是第一层嵌套页面"}],"unique_index":"cfhb2wggujlpvow83x","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数4_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h3[1]","allXPaths":["/html/body/h3[1]","//h3[contains(., '这是第二层嵌套页面')]","/html/body/h3"],"exampleValues":[{"num":0,"value":"这是第二层嵌套页面"}],"unique_index":"eztzqdqfuwalpvowhg1","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":5,"index":6,"parentId":0,"type":1,"option":8,"title":"循环采集数据","sequence":[7],"isInLoop":false,"position":4,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/p","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/p[1]","//p[contains(., '这是第二层嵌套页面的')]","/html/body/p[last()-3]"]}},{"id":9,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":true,"name":"参数5_文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"这是第二层嵌套页面的内容"}],"unique_index":"a6mtwdcma4flpvowjef","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":6,"index":8,"parentId":0,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":false,"position":5,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"/html/body/h1[1]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"alertHandleType":0}},{"id":7,"index":9,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":6,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数3_文本1","desc":"","extractType":0,"relativeXPath":"/html/body/h2[1]","allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"],"exampleValues":[{"num":0,"value":"这是第一层嵌套页面"}],"unique_index":"cfhb2wggujlpvow83x","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":0,"relative":false,"name":"参数4_文本1","desc":"","extractType":0,"relativeXPath":"/html/body/h3[1]","allXPaths":["/html/body/h3[1]","//h3[contains(., '这是第二层嵌套页面')]","/html/body/h3"],"exampleValues":[{"num":0,"value":"这是第二层嵌套页面"}],"unique_index":"eztzqdqfuwalpvowhg1","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}}]} \ No newline at end of file diff --git a/ElectronJS/tasks/232.json b/ElectronJS/tasks/232.json new file mode 100644 index 0000000..2e63ed8 --- /dev/null +++ b/ElectronJS/tasks/232.json @@ -0,0 +1 @@ +{"id":232,"name":"多层嵌套iframe示例 - 主页面","url":"https://easyspider.cn/test_pages/nested_iframe.html","links":"https://easyspider.cn/test_pages/nested_iframe.html","create_time":"12/8/2023, 5:12:02 AM","update_time":"12/8/2023, 6:04:41 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"desc":"https://easyspider.cn/test_pages/nested_iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/nested_iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/nested_iframe.html"}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是第二层嵌套页面的内容"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"这是第二层嵌套页面"}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,10],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/nested_iframe.html","links":"https://easyspider.cn/test_pages/nested_iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"id":-1,"index":2,"parentId":0,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h3[1]","allXPaths":["/html/body/h3[1]","//h3[contains(., '这是第二层嵌套页面')]","/html/body/h3"],"exampleValues":[{"num":0,"value":"这是第二层嵌套页面"}],"unique_index":"0k9uhqb7mlnhlpvp1hwz","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":-1,"index":3,"parentId":2,"type":1,"option":8,"title":"循环采集数据","sequence":[4],"isInLoop":true,"position":2,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/p","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/p[1]","//p[contains(., '这是第二层嵌套页面的')]","/html/body/p[last()-3]"]}},{"id":-1,"index":4,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":7,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":true,"name":"参数2_文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"这是第二层嵌套页面的内容"}],"unique_index":"6kosmxdf35llpvp1k8k","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":-1,"index":5,"parentId":0,"type":0,"option":2,"title":"点击这是第一层嵌...","sequence":[],"isInLoop":false,"position":3,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/h2[1]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"alertHandleType":0,"allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"]}},{"id":-1,"index":6,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[],"isInLoop":false,"position":2,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0}},{"id":-1,"index":7,"parentId":0,"type":1,"option":8,"title":"循环点击单个元素","sequence":[8,9,3],"isInLoop":false,"position":1,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/h2[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":2,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"]}},{"id":-1,"index":8,"parentId":2,"type":0,"option":2,"title":"点击这是第一层嵌...","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":3,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"alertHandleType":0,"allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"]}},{"id":-1,"index":9,"parentId":2,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":false,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h2[1]","allXPaths":["/html/body/h2[1]","//h2[contains(., '这是第一层嵌套页面')]","/html/body/h2"],"exampleValues":[{"num":0,"value":"这是第一层嵌套页面"}],"unique_index":"r2h4mcoueblpvp38gj","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}},{"id":2,"index":10,"parentId":0,"type":1,"option":8,"title":"循环采集数据","sequence":[11,12,13],"isInLoop":false,"position":1,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/p","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/p[1]","//p[contains(., '这是第二层嵌套页面的')]","/html/body/p[last()-3]"]}},{"id":3,"index":11,"parentId":2,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":true,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":true,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"这是第二层嵌套页面的内容"}],"unique_index":"8siuxtx3k2glpvqory3","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":4,"index":12,"parentId":2,"type":0,"option":2,"title":"点击这是第二层嵌...","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"/html/body/h1[1]","iframe":false,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":0,"maxWaitTime":10,"paras":[],"alertHandleType":0,"allXPaths":["/html/body/h3[1]","//h3[contains(., '这是第二层嵌套页面')]","/html/body/h3"]}},{"id":5,"index":13,"parentId":2,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":2,"parameters":{"history":3,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数2_文本","desc":"","extractType":0,"relativeXPath":"/html/body/h1[1]","allXPaths":["/html/body/h3[1]","//h3[contains(., '这是第二层嵌套页面')]","/html/body/h3"],"exampleValues":[{"num":0,"value":"这是第二层嵌套页面"}],"unique_index":"p8lt44b21hblpvqoy5e","iframe":false,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}]}}]} \ No newline at end of file diff --git a/ElectronJS/tasks/233.json b/ElectronJS/tasks/233.json new file mode 100644 index 0000000..c2facf7 --- /dev/null +++ b/ElectronJS/tasks/233.json @@ -0,0 +1 @@ +{"id":233,"name":"Dynamic Iframe","url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","create_time":"12/8/2023, 5:20:59 AM","update_time":"12/8/2023, 5:51:57 AM","version":"0.6.0","saveThreshold":10,"quitWaitTime":60,"environment":0,"maximizeWindow":0,"maxViewLength":15,"recordLog":1,"outputFormat":"xlsx","saveName":"current_time","inputExcel":"","startFromExit":0,"pauseKey":"p","containJudge":false,"desc":"https://easyspider.cn/test_pages/iframe.html","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://easyspider.cn/test_pages/iframe.html","desc":"要采集的网址列表,多行以\\n分开","type":"text","exampleValue":"https://easyspider.cn/test_pages/iframe.html"},{"id":1,"name":"inputText_1","nodeName":"输入文字","nodeId":2,"desc":"要输入的文本,如京东搜索框输入:电脑","type":"text","exampleValue":"12","value":"12"},{"id":2,"name":"loopTimes_循环点击单个元素_2","nodeId":4,"nodeName":"循环点击单个元素","desc":"循环循环点击单个元素执行的次数(0代表无限循环)","type":"int","exampleValue":0,"value":0}],"outputParameters":[{"id":0,"name":"参数1_文本","desc":"","type":"text","recordASField":1,"exampleValue":"3.7"},{"id":1,"name":"参数2_文本","desc":"","type":"text","recordASField":1,"exampleValue":"2023-11-3003:44:10"},{"id":2,"name":"参数3_文本","desc":"","type":"text","recordASField":1,"exampleValue":"37.53"},{"id":3,"name":"参数4_文本","desc":"","type":"text","recordASField":1,"exampleValue":"112.47"},{"id":4,"name":"参数5_文本","desc":"","type":"text","recordASField":1,"exampleValue":"28"},{"id":5,"name":"参数6_链接文本","desc":"","type":"text","recordASField":1,"exampleValue":"山西太原市清徐县"},{"id":6,"name":"参数7_链接地址","desc":"","type":"text","recordASField":1,"exampleValue":"https://news.ceic.ac.cn/CC20231130034410.html"},{"id":7,"name":"参数8_文本","desc":"","type":"text","recordASField":1,"exampleValue":"震级(M)"},{"id":8,"name":"参数9_文本","desc":"","type":"text","recordASField":1,"exampleValue":"发震时刻(UTC+8)"},{"id":9,"name":"参数10_文本","desc":"","type":"text","recordASField":1,"exampleValue":"纬度(°)"},{"id":10,"name":"参数11_文本","desc":"","type":"text","recordASField":1,"exampleValue":"经度(°)"},{"id":11,"name":"参数12_文本","desc":"","type":"text","recordASField":1,"exampleValue":"深度(千米)"},{"id":12,"name":"参数13_文本","desc":"","type":"text","recordASField":1,"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":"","iframe":false,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":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,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"url":"https://easyspider.cn/test_pages/iframe.html","links":"https://easyspider.cn/test_pages/iframe.html","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"cookies":""}},{"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\"]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"value":"12","index":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]"]}},{"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\"]","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":1,"maxWaitTime":10,"paras":[],"alertHandleType":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a"]}},{"id":4,"index":4,"parentId":0,"type":1,"option":8,"title":"循环点击单个元素","sequence":[6,5],"isInLoop":false,"position":3,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"//*[contains(@class, \"pagination\")]/ul[1]/li[last()-1]/a[1]","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":0,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"]}},{"id":6,"index":5,"parentId":4,"type":0,"option":2,"title":"点击»","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":-1,"useLoop":true,"xpath":"","iframe":true,"wait":2,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"clickWay":1,"maxWaitTime":10,"paras":[],"alertHandleType":0,"allXPaths":["/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]","//a[contains(., '»')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a"],"loopType":0}},{"id":5,"index":6,"parentId":4,"type":1,"option":8,"title":"循环采集数据","sequence":[7],"isInLoop":true,"position":0,"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","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"scrollType":0,"scrollCount":1,"scrollWaitTime":1,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"exitElement":"//body","historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"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']","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]"]}},{"id":7,"index":7,"parentId":5,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":-1,"useLoop":false,"xpath":"","iframe":true,"wait":0,"waitType":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"waitElement":"","waitElementTime":10,"waitElementIframeIndex":0,"clear":0,"newLine":1,"paras":[{"nodeType":0,"contentType":1,"relative":true,"name":"参数1_文本","desc":"","relativeXPath":"/td[1]","allXPaths":["/td[1]","//td[contains(., '3.7')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-5]"],"exampleValues":[{"num":0,"value":"3.7"}],"unique_index":"/td[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数2_文本","desc":"","relativeXPath":"/td[2]","allXPaths":["/td[2]","//td[contains(., '2023-11-30')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-4]"],"exampleValues":[{"num":0,"value":"2023-11-3003:44:10"}],"unique_index":"/td[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数3_文本","desc":"","relativeXPath":"/td[3]","allXPaths":["/td[3]","//td[contains(., '37.53')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-3]"],"exampleValues":[{"num":0,"value":"37.53"}],"unique_index":"/td[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数4_文本","desc":"","relativeXPath":"/td[4]","allXPaths":["/td[4]","//td[contains(., '112.47')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-2]"],"exampleValues":[{"num":0,"value":"112.47"}],"unique_index":"/td[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数5_文本","desc":"","relativeXPath":"/td[5]","allXPaths":["/td[5]","//td[contains(., '28')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td[last()-1]"],"exampleValues":[{"num":0,"value":"28"}],"unique_index":"/td[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":1,"contentType":0,"relative":true,"name":"参数6_链接文本","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"山西太原市清徐县"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":2,"contentType":0,"relative":true,"name":"参数7_链接地址","desc":"","relativeXPath":"/td[6]/a[1]","allXPaths":["/td[6]/a[1]","//a[contains(., '山西太原市清徐县')]","id(\"cid\")","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-19]/td/a"],"exampleValues":[{"num":0,"value":"https://news.ceic.ac.cn/CC20231130034410.html"}],"unique_index":"/td[6]/a[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数8_文本","desc":"","relativeXPath":"/th[1]","allXPaths":["/th[1]","//th[contains(., '震级(M)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]"],"exampleValues":[{"num":1,"value":"震级(M)"}],"unique_index":"/th[1]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数9_文本","desc":"","relativeXPath":"/th[2]","allXPaths":["/th[2]","//th[contains(., '发震时刻(UTC+8')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]"],"exampleValues":[{"num":1,"value":"发震时刻(UTC+8)"}],"unique_index":"/th[2]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数10_文本","desc":"","relativeXPath":"/th[3]","allXPaths":["/th[3]","//th[contains(., '纬度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]"],"exampleValues":[{"num":1,"value":"纬度(°)"}],"unique_index":"/th[3]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数11_文本","desc":"","relativeXPath":"/th[4]","allXPaths":["/th[4]","//th[contains(., '经度(°)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]"],"exampleValues":[{"num":1,"value":"经度(°)"}],"unique_index":"/th[4]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数12_文本","desc":"","relativeXPath":"/th[5]","allXPaths":["/th[5]","//th[contains(., '深度(千米)')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]"],"exampleValues":[{"num":1,"value":"深度(千米)"}],"unique_index":"/th[5]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0},{"nodeType":0,"contentType":1,"relative":true,"name":"参数13_文本","desc":"","relativeXPath":"/th[6]","allXPaths":["/th[6]","//th[contains(., '参考位置')]","/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th"],"exampleValues":[{"num":1,"value":"参考位置"}],"unique_index":"/th[6]","iframe":true,"default":"","paraType":"text","recordASField":1,"beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}}]} \ No newline at end of file diff --git a/ExecuteStage/.vscode/launch.json b/ExecuteStage/.vscode/launch.json index f36c93d..5fc14cc 100644 --- a/ExecuteStage/.vscode/launch.json +++ b/ExecuteStage/.vscode/launch.json @@ -12,8 +12,8 @@ "justMyCode": false, // "args": ["--ids", "[7]", "--read_type", "remote", "--headless", "0"] // "args": ["--ids", "[9]", "--read_type", "remote", "--headless", "0", "--saved_file_name", "YOUTUBE"] - // "args": ["--ids", "[1]", "--headless", "0", "--user_data", "1", "--keyboard", "1"] - "args": "--ids '[3]' --user_data 1 --server_address http://localhost:8074 --config_folder '/Users/naibo/Documents/EasySpider/ElectronJS/' --headless 0 --read_type remote --config_file_name config.json --saved_file_name" + "args": ["--ids", "[149]", "--headless", "0", "--user_data", "0", "--keyboard", "0"] + // "args": "--ids '[97]' --user_data 1 --server_address http://localhost:8074 --config_folder '/Users/naibo/Documents/EasySpider/ElectronJS/' --headless 0 --read_type remote --config_file_name config.json --saved_file_name" } ] } \ No newline at end of file diff --git a/ExecuteStage/easyspider_executestage.py b/ExecuteStage/easyspider_executestage.py index 5f6c067..68e5e0f 100644 --- a/ExecuteStage/easyspider_executestage.py +++ b/ExecuteStage/easyspider_executestage.py @@ -2,6 +2,7 @@ # import atexit import atexit import copy +import platform import shutil import string import undetected_chromedriver as uc @@ -1711,6 +1712,7 @@ class BrowserThread(Thread): p["relativeXPath"], self.outputParameters, self) # 只有当前环境不变变化才可以快速提取数据 if self.browser.iframe_env != p["iframe"]: + # if p["iframe"] or self.browser.iframe_env != p["iframe"]: # 如果是iframe,则不能快速提取数据,主要是各个上下文的iframe切换,但一般不会有人这么做 p["optimizable"] = False continue # relativeXPath = relativeXPath.lower() @@ -1820,7 +1822,7 @@ class BrowserThread(Thread): element = self.browser.find_element( By.XPATH, relativeXPath, iframe=p["iframe"]) except ( - NoSuchElementException, InvalidSelectorException, StaleElementReferenceException): # 找不到元素的时候,使用默认值 + NoSuchElementException, InvalidSelectorException, StaleElementReferenceException) as e: # 找不到元素的时候,使用默认值 # self.print_and_log(p) try: content = p["default"] @@ -1835,6 +1837,7 @@ class BrowserThread(Thread): self.print_and_log( "提取数据操作时,字段名 %s 对应XPath %s 未找到,使用默认值,本字段将不再重复报错" % ( p["name"], relativeXPath)) + self.dataNotFoundKeys[p["name"]] = True except: pass continue @@ -1916,92 +1919,57 @@ if __name__ == '__main__': print(c) options = webdriver.ChromeOptions() driver_path = "chromedriver.exe" - import platform - print(sys.platform, platform.architecture()) - # option = webdriver.ChromeOptions() if not os.path.exists(os.getcwd() + "/Data"): os.mkdir(os.getcwd() + "/Data") if sys.platform == "darwin" and platform.architecture()[0] == "64bit": options.binary_location = "EasySpider.app/Contents/Resources/app/chrome_mac64.app/Contents/MacOS/Google Chrome" - # MacOS需要用option而不是options! - # option.binary_location = "EasySpider.app/Contents/Resources/app/chrome_mac64.app/Contents/MacOS/Google Chrome" - # option.add_extension( - # "EasySpider.app/Contents/Resources/app/XPathHelper.crx") options.add_extension( "EasySpider.app/Contents/Resources/app/XPathHelper.crx") driver_path = "EasySpider.app/Contents/Resources/app/chromedriver_mac64" - # options.binary_location = "chrome_mac64.app/Contents/MacOS/Google Chrome" - # # MacOS需要用option而不是options! - # option.binary_location = "chrome_mac64.app/Contents/MacOS/Google Chrome" - # driver_path = os.getcwd()+ "/chromedriver_mac64" print(driver_path) if c.config_folder == "": c.config_folder = os.path.expanduser( "~/Library/Application Support/EasySpider/") - # print("Config folder for MacOS:", c.config_folder) elif os.path.exists(os.getcwd() + "/EasySpider/resources"): # 打包后的路径 print("Finding chromedriver in EasySpider", os.getcwd() + "/EasySpider") if sys.platform == "win32" and platform.architecture()[0] == "32bit": options.binary_location = os.path.join( os.getcwd(), "EasySpider/resources/app/chrome_win32/chrome.exe") # 指定chrome位置 - # option.binary_location = os.path.join( - # os.getcwd(), "EasySpider/resources/app/chrome_win32/chrome.exe") # 指定chrome位置 driver_path = os.path.join( os.getcwd(), "EasySpider/resources/app/chrome_win32/chromedriver_win32.exe") - # option.add_extension("EasySpider/resources/app/XPathHelper.crx") options.add_extension("EasySpider/resources/app/XPathHelper.crx") elif sys.platform == "win32" and platform.architecture()[0] == "64bit": options.binary_location = os.path.join( os.getcwd(), "EasySpider/resources/app/chrome_win64/chrome.exe") - # option.binary_location = os.path.join( - # os.getcwd(), "EasySpider/resources/app/chrome_win64/chrome.exe") driver_path = os.path.join( os.getcwd(), "EasySpider/resources/app/chrome_win64/chromedriver_win64.exe") - # option.add_extension("EasySpider/resources/app/XPathHelper.crx") options.add_extension("EasySpider/resources/app/XPathHelper.crx") elif sys.platform == "linux" and platform.architecture()[0] == "64bit": options.binary_location = "EasySpider/resources/app/chrome_linux64/chrome" - # option.binary_location = "EasySpider/resources/app/chrome_linux64/chrome" driver_path = "EasySpider/resources/app/chrome_linux64/chromedriver_linux64" - # option.add_extension("EasySpider/resources/app/XPathHelper.crx") options.add_extension("EasySpider/resources/app/XPathHelper.crx") else: print("Unsupported platform") sys.exit() print("Chrome location:", options.binary_location) print("Chromedriver location:", driver_path) - # elif os.getcwd().find("ExecuteStage") >= 0: # 如果直接执行 - # print("Finding chromedriver in ./Chrome", - # os.getcwd()+"/Chrome") - # options.binary_location = "./Chrome/chrome.exe" # 指定chrome位置 - # # option.binary_location = "C:\\Users\\q9823\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe" - # driver_path = "./Chrome/chromedriver.exe" elif os.path.exists(os.getcwd() + "/../ElectronJS"): # 软件dev用 print("Finding chromedriver in EasySpider", os.getcwd() + "/ElectronJS") - # option.binary_location = "../ElectronJS/chrome_win64/chrome.exe" # 指定chrome位置 options.binary_location = "../ElectronJS/chrome_win64/chrome.exe" # 指定chrome位置 driver_path = "../ElectronJS/chrome_win64/chromedriver_win64.exe" - # option.add_extension("../ElectronJS/XPathHelper.crx") options.add_extension("../ElectronJS/XPathHelper.crx") else: options.binary_location = "./chrome.exe" # 指定chrome位置 - # option.binary_location = "./chrome.exe" # 指定chrome位置 driver_path = "./chromedriver.exe" - # option.add_extension("XPathHelper.crx") options.add_extension("XPathHelper.crx") - # option.add_experimental_option( - # 'excludeSwitches', ['enable-automation']) # 以开发者模式 options.add_experimental_option( 'excludeSwitches', ['enable-automation']) # 以开发者模式 - # user_data_dir = r'' # 注意没有Default! - - # options.add_argument('--user-data-dir='+p) # 总结: # 0. 带Cookie需要用userdatadir @@ -2018,22 +1986,15 @@ if __name__ == '__main__': except: pass - # options.add_argument( - # '--user-data-dir=C:\\Users\\q9823\\AppData\\Local\\Google\\Chrome\\User Data') # TMALL 反扒 - # option.add_argument( - # "--disable-blink-features=AutomationControlled") # TMALL 反扒 options.add_argument( "--disable-blink-features=AutomationControlled") # TMALL 反扒 options.add_argument('-ignore-certificate-errors') options.add_argument('-ignore -ssl-errors') - # option.add_argument('-ignore-certificate-errors') - # option.add_argument('-ignore -ssl-errors') if c.headless: print("Headless mode") print("无头模式") - # option.add_argument("--headless") options.add_argument("--headless") tmp_options = [] @@ -2058,11 +2019,7 @@ if __name__ == '__main__': shutil.copytree(absolute_user_data_folder, tmp_user_data_folder) print("User data folder copied successfully, if you exit the program before it finishes, please delete the temporary user data folder manually.") print("用户信息目录复制成功,如果程序在运行过程中被手动退出,请手动删除临时用户信息目录。") - # option = tmp_options[i]["option"] options = tmp_options[i]["options"] - # option.add_argument( - # f'--user-data-dir={tmp_user_data_folder}') # TMALL 反扒 - # option.add_argument("--profile-directory=Default") options.add_argument( f'--user-data-dir={tmp_user_data_folder}') # TMALL 反扒 options.add_argument("--profile-directory=Default") @@ -2074,7 +2031,6 @@ if __name__ == '__main__': threads = [] for i in range(len(c.ids)): id = c.ids[i] - # option = tmp_options[i]["option"] options = tmp_options[i]["options"] print("id: ", id) if c.read_type == "remote": @@ -2100,7 +2056,6 @@ if __name__ == '__main__': cloudflare = 0 if cloudflare == 0: options.add_argument('log-level=3') # 隐藏日志 - # option.add_argument('log-level=3') # 隐藏日志 path = os.path.join(os.path.abspath("./"), "Data", "Task_" + str(id)) print("Data path:", path) options.add_experimental_option("prefs", { @@ -2116,37 +2071,17 @@ if __name__ == '__main__': 'safebrowsing.disable_download_protection': True, 'profile.default_content_settings.popups': 0, }) - # option.add_experimental_option("prefs", { - # # 设置文件下载路径 - # "download.default_directory": path, - # "download.prompt_for_download": False, # 禁止下载提示框 - # "plugins.plugins_list": [{"enabled": False, "name": "Chrome PDF Viewer"}], - # "download.directory_upgrade": True, - # "download.extensions_to_open": "applications/pdf", - # "plugins.always_open_pdf_externally": True, # 总是在外部程序中打开PDF - # "safebrowsing_for_trusted_sources_enabled": False, - # "safebrowsing.enabled": False, - # 'safebrowsing.enabled': False, - # 'safebrowsing.disable_download_protection': True, - # 'profile.default_content_settings.popups': 0, - # }) try: if service["environment"] == 1: - # option.add_experimental_option( - # 'mobileEmulation', {'deviceName': 'iPhone X'}) # 模拟iPhone X浏览 options.add_experimental_option( 'mobileEmulation', {'deviceName': 'iPhone X'}) # 模拟iPhone X浏览 except: pass - # browser_t = MyChrome( - # options=options, chrome_options=option, executable_path=driver_path) selenium_service = Service(executable_path=driver_path) browser_t = MyChrome(service=selenium_service, options=options) elif cloudflare == 1: if sys.platform == "win32": options.binary_location = "C:\\Program Files\\Google\\Chrome Beta\\Application\\chrome.exe" # 需要用自己的浏览器 - # options.add_argument("--auto-open-devtools-for-tabs") - # options.binary_location = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" # 需要用自己的浏览器 browser_t = MyUCChrome( options=options, driver_executable_path=driver_path) links = list(filter(isnotnull, service["links"].split("\n"))) @@ -2200,8 +2135,6 @@ if __name__ == '__main__': # print("您的操作系统不支持暂停功能。") # print("Your operating system does not support the pause function.") - # print("线程长度:", len(threads) ) - for thread in threads: print() thread.join() diff --git a/ExecuteStage/generateEXE_win64.cmd b/ExecuteStage/generateEXE_win64.cmd index f04376f..fa936b2 100644 --- a/ExecuteStage/generateEXE_win64.cmd +++ b/ExecuteStage/generateEXE_win64.cmd @@ -1,6 +1,6 @@ rmdir /s /q build rmdir /s /q dist @REM pyinstaller -F --icon=favicon.ico easyspider_executestage.py -pyinstaller -F --icon=favicon.ico --add-data "C:\Python311\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_shared.dll;onnxruntime\capi" --add-data "C:\Python311\Lib\site-packages\ddddocr\common.onnx;ddddocr" easyspider_executestage.py +pyinstaller -F --icon=favicon.ico --add-data "C:\Users\q9823\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\onnxruntime\capi\onnxruntime_providers_shared.dll;onnxruntime\capi" --add-data "C:\Users\q9823\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\ddddocr\common.onnx;ddddocr" easyspider_executestage.py del ..\ElectronJS\chrome_win64\easyspider_executestage.exe copy dist\easyspider_executestage.exe ..\ElectronJS\chrome_win64\easyspider_executestage.exe \ No newline at end of file diff --git a/ExecuteStage/myChrome.py b/ExecuteStage/myChrome.py index 7934e52..ad5d352 100644 --- a/ExecuteStage/myChrome.py +++ b/ExecuteStage/myChrome.py @@ -25,75 +25,150 @@ class MyChrome(webdriver.Chrome): self.iframe_env = False # 现在的环境是root还是iframe super().__init__(*args, **kwargs) # 调用父类的 __init__ - def find_element(self, by=By.ID, value=None, iframe=False): - # 在这里改变查找元素的行为 - if self.iframe_env: - super().switch_to.default_content() - self.iframe_env = False - if iframe: - # 获取所有的 iframe + # def find_element(self, by=By.ID, value=None, iframe=False): + # # 在这里改变查找元素的行为 + # if self.iframe_env: + # super().switch_to.default_content() + # self.iframe_env = False + # if iframe: + # # 获取所有的 iframe + # try: + # iframes = super().find_elements(By.CSS_SELECTOR, "iframe") + # except Exception as e: + # print(e) + # find_element = False + # # 遍历所有的 iframe 并查找里面的元素 + # for iframe in iframes: + # # 切换到 iframe + # super().switch_to.default_content() + # super().switch_to.frame(iframe) + # self.iframe_env = True + # try: + # # 在 iframe 中查找元素 + # # 在这个例子中,我们查找 XPath 为 '//div[1]' 的元素 + # element = super().find_element(by=by, value=value) + # find_element = True + # except NoSuchElementException as e: + # print(f"No such element found in the iframe: {str(e)}") + # except Exception as e: + # print(f"Exception: {str(e)}") + # # 完成操作后切回主文档 + # # super().switch_to.default_content() + # if find_element: + # return element + # if not find_element: + # raise NoSuchElementException + # else: + # return super().find_element(by=by, value=value) + + def find_element_recursive(self, by, value, frames): + for frame in frames: try: - iframes = super().find_elements(By.CSS_SELECTOR, "iframe") - except Exception as e: - print(e) - find_element = False - # 遍历所有的 iframe 并查找里面的元素 - for iframe in iframes: - # 切换到 iframe - super().switch_to.default_content() - super().switch_to.frame(iframe) - self.iframe_env = True try: - # 在 iframe 中查找元素 - # 在这个例子中,我们查找 XPath 为 '//div[1]' 的元素 - element = super().find_element(by=by, value=value) - find_element = True - except NoSuchElementException as e: - print(f"No such element found in the iframe: {str(e)}") - except Exception as e: - print(f"Exception: {str(e)}") - # 完成操作后切回主文档 - # super().switch_to.default_content() - if find_element: + self.switch_to.frame(frame) + except StaleElementReferenceException: + # If the frame has been refreshed, we need to switch to the parent frame first, + self.switch_to.parent_frame() + self.switch_to.frame(frame) + try: + # !!! Attempt to find the element in the current frame, not the context (iframe environment will not change to default), therefore we use super().find_element instead of self.find_element + element = super(MyChrome, self).find_element(by=by, value=value) return element - if not find_element: - raise NoSuchElementException - else: - return super().find_element(by=by, value=value) + except NoSuchElementException: + # Recurse into nested iframes + nested_frames = super(MyChrome, self).find_elements(By.CSS_SELECTOR, "iframe") + if nested_frames: + element = self.find_element_recursive(by, value, nested_frames) + if element: + return element + except Exception as e: + print(f"Exception while processing frame: {e}") - def find_elements(self, by=By.ID, value=None, iframe=False): - # 在这里改变查找元素的行为 - if self.iframe_env: - super().switch_to.default_content() - self.iframe_env = False + raise NoSuchElementException(f"Element {value} not found in any frame or iframe") + + def find_element(self, by=By.ID, value=None, iframe=False): + self.switch_to.default_content() # Switch back to the main document + self.iframe_env = False if iframe: - # 获取所有的 iframe - iframes = super().find_elements(By.CSS_SELECTOR, "iframe") - find_element = False - # 遍历所有的 iframe 并找到里面的元素 - for iframe in iframes: - # 切换到 iframe + frames = self.find_elements(By.CSS_SELECTOR, "iframe") + if not frames: + raise NoSuchElementException(f"No iframes found in the current page while searching for {value}") + self.iframe_env = True + return self.find_element_recursive(by, value, frames) + else: + # Find element in the main document as normal + return super(MyChrome, self).find_element(by=by, value=value) + + # def find_elements(self, by=By.ID, value=None, iframe=False): + # # 在这里改变查找元素的行为 + # if self.iframe_env: + # super().switch_to.default_content() + # self.iframe_env = False + # if iframe: + # # 获取所有的 iframe + # iframes = super().find_elements(By.CSS_SELECTOR, "iframe") + # find_element = False + # # 遍历所有的 iframe 并找到里面的元素 + # for iframe in iframes: + # # 切换到 iframe + # try: + # super().switch_to.default_content() + # super().switch_to.frame(iframe) + # self.iframe_env = True + # # 在 iframe 中查找元素 + # # 在这个例子中,我们查找 XPath 为 '//div[1]' 的元素 + # elements = super().find_elements(by=by, value=value) + # if len(elements) > 0: + # find_element = True + # # 完成操作后切回主文档 + # # super().switch_to.default_content() + # if find_element: + # return elements + # except NoSuchElementException as e: + # print(f"No such element found in the iframe: {str(e)}") + # except Exception as e: + # print(f"Exception: {str(e)}") + # if not find_element: + # raise NoSuchElementException + # else: + # return super().find_elements(by=by, value=value) + + def find_elements_recursive(self, by, value, frames): + for frame in frames: + try: try: - super().switch_to.default_content() - super().switch_to.frame(iframe) - self.iframe_env = True - # 在 iframe 中查找元素 - # 在这个例子中,我们查找 XPath 为 '//div[1]' 的元素 - elements = super().find_elements(by=by, value=value) - if len(elements) > 0: - find_element = True - # 完成操作后切回主文档 - # super().switch_to.default_content() - if find_element: + self.switch_to.frame(frame) + except StaleElementReferenceException: + # If the frame has been refreshed, we need to switch to the parent frame first, + self.switch_to.parent_frame() + self.switch_to.frame(frame) + # Directly find elements in the current frame + elements = super(MyChrome, self).find_elements(by=by, value=value) + if elements: + return elements + # Recursively search for elements in nested iframes + nested_frames = super(MyChrome, self).find_elements(By.CSS_SELECTOR, "iframe") + if nested_frames: + elements = self.find_elements_recursive(by, value, nested_frames) + if elements: return elements - except NoSuchElementException as e: - print(f"No such element found in the iframe: {str(e)}") - except Exception as e: - print(f"Exception: {str(e)}") - if not find_element: - raise NoSuchElementException + except Exception as e: + print(f"Exception while processing frame: {e}") + + raise NoSuchElementException(f"Elements with {value} not found in any frame or iframe") + + def find_elements(self, by=By.ID, value=None, iframe=False): + self.switch_to.default_content() # Switch back to the main document + self.iframe_env = False + if iframe: + frames = self.find_elements(By.CSS_SELECTOR, "iframe") + if not frames: + return [] # Return an empty list if no iframes are found + self.iframe_env = True + return self.find_elements_recursive(by, value, frames) else: - return super().find_elements(by=by, value=value) + # Find elements in the main document as normal + return super(MyChrome, self).find_elements(by=by, value=value) # MacOS不支持直接打包带Cloudflare的功能,如果要自己编译运行,可以把这个if去掉,然后配置好浏览器和driver路径 if sys.platform != "darwin": diff --git a/Extension/manifest_v3/package-lock.json b/Extension/manifest_v3/package-lock.json index 10831cf..aedb387 100644 --- a/Extension/manifest_v3/package-lock.json +++ b/Extension/manifest_v3/package-lock.json @@ -1,12 +1,12 @@ { "name": "EasySpider", - "version": "0.5.0", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "EasySpider", - "version": "0.5.0", + "version": "0.6.0", "license": "AGPL-3.0", "dependencies": { "crx": "^5.0.1", diff --git a/Extension/manifest_v3/src/content-scripts/config.json b/Extension/manifest_v3/src/content-scripts/config.json index a2e684c..3706a6d 100644 --- a/Extension/manifest_v3/src/content-scripts/config.json +++ b/Extension/manifest_v3/src/content-scripts/config.json @@ -1 +1 @@ -{"language":"zh"} \ No newline at end of file +{"language":"en"} \ No newline at end of file