|
- <mxGraphModel>
- <root>
- <mxCell id="0">
- <JsonProperty as="data">
- {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="1" parent="0"/>
- <mxCell id="2" value="开始" style="start" parent="1" vertex="1">
- <mxGeometry x="20" y="90" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"shape":"start"}
- </JsonProperty>
- </mxCell>
- <mxCell id="15" value="抓取列表" style="request" parent="1" vertex="1">
- <mxGeometry x="559" y="90" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"抓取列表","loopVariableName":"","method":"GET","sleep":"200","timeout":"3000","response-charset":"","retryCount":"3","retryInterval":"200","cookie-name":["Cookie"],"cookie-description":[""],"body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\"http://www.baidu.com/s?ie=utf-8&medium=1&rtt=1&bsst=1&rsv_dl=news_t_sk&cl=2&wd=\"+keyword+\"&tn=news&rsv_bp=1&tfflag=0&tngroupname=organic_news&newVideo=12&goods_entry_switch=1&pn=\"+startIndex+\"0\"}","proxy":"","cookie-value":["BIDUPSID=FFCCEFFD6AD71B7D82B27246697129D3; PSTM=1661740480; BAIDUID=6504A43EB0274812F809031B8671878C:FG=1; BD_UPN=12314753; BDUSS=NneHRaYzJNVnVCQ1lOa2RLNkozYlBNQkJMeHVqMzFOZm96SH5mQWlKajZia2RqSVFBQUFBJCQAAAAAAAAAAAEAAAB~B2D2tcjIscqntcSwrgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPrhH2P64R9jb0; BDUSS_BFESS=NneHRaYzJNVnVCQ1lOa2RLNkozYlBNQkJMeHVqMzFOZm96SH5mQWlKajZia2RqSVFBQUFBJCQAAAAAAAAAAAEAAAB~B2D2tcjIscqntcSwrgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPrhH2P64R9jb0; H_WISE_SIDS=110085_209568_211986_212870_215730_216941_219942_219946_221410_221796_222298_222396_223064_223683_224055_224065_224086_225202_225640_225854_226026_226087_226589_226674_226722_227117_227592_227614_227864_227932_228374_228535_228650_228668_228978_229060_229155_229286_229363_229526_229691_229867_230020; BDORZ=FFFB88E999055A3F8A630C64834BD6D0; BAIDUID_BFESS=6504A43EB0274812F809031B8671878C:FG=1; B64_BOT=1; BDRCVFR[C5g0hgaJYCf]=bvBYpeu9K4bTAR3Qh4-I0; delPer=0; PSINO=3; BA_HECTOR=al8h2h852ka584a4agak0ggo1hj2sn519; ZFY=ieqEe:Ai8741EeaFdWPdP8JYsVLPfdZb2pa5AnSzsKW8:C; channel=bd.pe8.net; COOKIE_SESSION=2832_0_3_3_8_8_0_0_3_3_0_1_2833_0_54_0_1664186476_0_1664186530%7C9%23114260_19_1663339171%7C6; baikeVisitId=9b4f3a04-d583-4052-9723-8095c345a108; BD_CK_SAM=1; sugstore=1; H_PS_645EC=f709ExtDBjjkFE38TE3k8%2B41MnOFC0dMOW6Pc5%2BTWxSUTxI8HeJCOlKpHClk30Xoq46OZjUQVWvG; BDRCVFR[C0p6oIjvx-c]=sycO_VPkq2bfjf4njRdn1DLg1nkgv99; H_PS_PSSID=37378_36548_36460_37354_37495_36885_37486_37396_36786_37447_37371; BDSVRTM=39"],"request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}
- </JsonProperty>
- </mxCell>
- <mxCell id="33" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="689" y="90" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["titles","urls","times","sources","totals","total","pages","pages","abstracts","imgurls"],"variable-description":["标题","摘要","原始链接","来源网站","","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.selectors(\"div>#content_left>div>div>.news-title_1YtI1\").texts()}","${resp.selectors(\"div>#content_left>div>div>.news-title_1YtI1>a\").attrs(\"href\")}","${resp.selectors(\"div>#content_left>div>div>div>div>span.c-gap-right-xsmall\").texts()}","${resp.selectors(\"div>#content_left>div>div>div>div>div>a>span\").texts()}","${resp.selector(\"#header_top_bar > span\").text()}","${strUtils.substring(totals,totals.indexOf(\"相关资讯\")+4,totals.lastIndexOf(\"个\"))}","${(strUtils.toInt(total)%10)==0?strUtils.toInt(total)/10:(strUtils.toInt(total)/10)+1}","${strUtils.toInt(pages+'')>2?2:pages}","${resp.selectors(\"div>#content_left>div>div>div>div>span.c-color-text\").texts()}","${resp.selectors(\"#content_left>div\")}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="54" value="" style="strokeWidth=2;sharp=1;" parent="1" source="15" target="33" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="55" value="循环" style="loop" parent="1" vertex="1">
- <mxGeometry x="826" y="90" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"循环","loopItem":"","loopVariableName":"j","loopCount":"${titles.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}
- </JsonProperty>
- </mxCell>
- <mxCell id="64" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="916" y="90" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","url","source","time","time","time","publish_time","abstract","imgurl","videojson","imglist","imgjson","","","","",""],"variable-description":["","","","","","","","","","","","","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${titles[j]}","${urls[j]}","${sources[j]}","${times[j]}","${strUtils.contains(time,\"昨天\")?(strUtils.substring(dateUtils.minusDay(1),0,10)+\" \"+strUtils.substring(time,2,time.length())+\":00\"):time}","${strUtils.contains(time,\"前天\")?(strUtils.substring(dateUtils.minusDay(2),0,10)+\" \"+strUtils.substring(time,2,time.length())+\":00\"):time}","${dateUtils.FormatDate(time)}","${abstracts[j]}","${imgurls.get(j+1).selector('div>div .c-span3 img').attr('src')}","${jsonUtils.createJsonObject()}","${jsonUtils.createJsonArray()}","${jsonUtils.createJsonObject()}","${imgjson.put(\"imgurl\",imgurl)}","${imglist.add(imgjson)}","${videojson.put(\"imglist\",imglist)}","${videojson.put(\"vediourl\",'')}","${videojson.put(\"videoorientationurl\",'')}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="65" value="" style="strokeWidth=2;sharp=1;" parent="1" source="55" target="64" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="106" value="" style="strokeWidth=2;sharp=1;" parent="1" source="33" target="55" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="112" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="190" y="90" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page","startIndex"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}","${page=='0'?'':(page-1)}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="113" value="" style="strokeWidth=2;sharp=1;" parent="1" source="2" target="112" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="114" value="" style="strokeWidth=2;sharp=1;" parent="1" source="112" target="15" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="115" value="输出" style="output" parent="1" vertex="1">
- <mxGeometry x="1080" y="90" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["title","url","source","publish_time","abstract","author","videojson"],"loopCount":"","output-value":["${strUtils.contains(title,keyword)?(strUtils.replaceAll(title,keyword,'<b class=\"key\" style=\"color:red\">'+keyword+'</b>')):(title)}","${url}","${source}","${publish_time}","${strUtils.contains(abstract,keyword)?(strUtils.replaceAll(abstract,keyword,'<b class=\"key\" style=\"color:red\">'+keyword+'</b>')):(abstract)}","${'-'}","${videojson}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}
- </JsonProperty>
- </mxCell>
- <mxCell id="116" value="" style="strokeWidth=2;sharp=1;" parent="1" source="64" target="115" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- </root>
- </mxGraphModel>
|