|
- <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="80" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"shape":"start"}
- </JsonProperty>
- </mxCell>
- <mxCell id="21" value="根据关键词搜索" style="request" parent="1" vertex="1">
- <mxGeometry x="630" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"根据关键词搜索","loopVariableName":"","method":"GET","sleep":"1000","timeout":"","response-charset":"","retryCount":"1","retryInterval":"2000","cookie-name":["cookie"],"cookie-description":[""],"header-name":["user-agent"],"header-description":[""],"body-type":"none","body-content-type":"text/plain","loopCount":"","url":"https://m.weibo.cn/api/container/getIndex?containerid=231522type%3D1%26q%3D%23${keyword}%23&page_type=searchall&page=${pageNo}","proxy":"","cookie-value":["SUB=_2AkMUDYtbf8NxqwJRmfwTz2LhZIhyyw7EieKiUXqAJRMxHRl-yT9jqhYstRB6P42ltJExNYB2psyLl8ONit3Dytbl__Lo; SUBP=0033WrSXqPxfM72-Ws9jqgMF55529P9D9WWcnADUlTd4zwRxZivlmOy.; _s_tentry=passport.weibo.com; Apache=5401105109200.461.1666253868866; SINAGLOBAL=5401105109200.461.1666253868866; ULV=1666253868908:1:1:1:5401105109200.461.1666253868866:"],"header-value":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"],"request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}
- </JsonProperty>
- </mxCell>
- <mxCell id="23" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="720" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["jsonhtml","data","parseArray"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["${jsonUtils.parseObject(resp.html)}","${jsonhtml.getJSONObject(\"data\")}","${data.getJSONArray(\"cards\")}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="30" value="自定义的关键词" style="variable" parent="1" vertex="1">
- <mxGeometry x="380" y="200" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"自定义的关键词","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","pageNo"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["南京","${pageNoData}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="34" value="循环" style="loop" parent="1" vertex="1">
- <mxGeometry x="830" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"循环","loopItem":"","loopVariableName":"z","loopCount":"${parseArray}","loopStart":"0","loopEnd":"-1","awaitSleep":"100","shape":"loop"}
- </JsonProperty>
- </mxCell>
- <mxCell id="35" value="" style="strokeWidth=2;strokeColor=#00ff00;sharp=1;" parent="1" source="23" target="34" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="36" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="930" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["jsonobject"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${parseArray.getJSONObject(z)}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="37" value="" style="strokeWidth=2;sharp=1;" parent="1" source="34" target="36" 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="38" value="含有card_group" style="variable" parent="1" vertex="1">
- <mxGeometry x="1120" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"含有card_group","loopVariableName":"","ziloopVariableName":"","variable-name":["cardgrouparray"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${jsonobject.getJSONArray(\"card_group\")}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="39" value="判断关键字,确定json类型" style="strokeWidth=2;strokeColor=#00ff00;sharp=1;" parent="1" source="36" target="38" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"判断关键字,确定json类型","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"${jsonobject.containsKey(\"card_group\") == true}","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="40" value="循环" style="loop" parent="1" vertex="1">
- <mxGeometry x="1210" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"循环","loopItem":"","loopVariableName":"index","loopCount":"${cardgrouparray.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"300","shape":"loop"}
- </JsonProperty>
- </mxCell>
- <mxCell id="41" value="" style="strokeWidth=2;strokeColor=#00ff00;sharp=1;" parent="1" source="38" target="40" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="42" value="获取内容详情页" style="variable" parent="1" vertex="1">
- <mxGeometry x="1402" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"获取内容详情页","loopVariableName":"","ziloopVariableName":"","variable-name":["source_url","url","mblog","abstract","publish_time","source","title"],"variable-description":["","","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${cardgrouparray.getJSONObject(index).getString(\"scheme\")}","${source_url.split(\"\\\\?\")[0]}","${cardgrouparray.getJSONObject(index).getJSONObject(\"mblog\")}","${mblog.text}","${mblog.created_at}","${'微博'}","${mblog.user.screen_name}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="43" value="带有详情页url的" style="strokeWidth=2;strokeColor=#00ff00;sharp=1;" parent="1" source="40" target="42" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"带有详情页url的","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"${cardgrouparray.getJSONObject(index).containsKey(\"mblog\") == true && cardgrouparray.getJSONObject(index).containsKey(\"scheme\") == true}","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="74" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="930" y="170" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["source_url","source_url","mblog"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["${jsonobject.getString(\"scheme\")}","${source_url.split(\"\\\\?\")[0]}","${jsonobject.getJSONObject(\"mblog\")}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="75" value="" style="strokeWidth=2;strokeColor=#00ff00;sharp=1;" parent="1" source="36" target="74" edge="1">
- <mxGeometry relative="1" as="geometry"/>
- <JsonProperty as="data">
- {"value":"","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"${jsonobject.containsKey(\"card_group\") == false}","transmit-variable":"1"}
- </JsonProperty>
- </mxCell>
- <mxCell id="87" value="" style="strokeWidth=2;sharp=1;" parent="1" source="30" target="21" 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="94" value="输出" style="output" parent="1" vertex="1">
- <mxGeometry x="1402" y="186" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["title","url","abstract","publish_time","source","author"],"loopCount":"","output-value":["${strUtils.contains(title,keyword)?(strUtils.replaceAll(title,keyword,'<b class=\"key\" style=\"color:red\">'+keyword+'</b>')):(title)}","${url}","${strUtils.contains(abstract,keyword)?(strUtils.replaceAll(abstract,keyword,'<b class=\"key\" style=\"color:red\">'+keyword+'</b>')):(abstract)}","${publish_time}","${source}","${title}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}
- </JsonProperty>
- </mxCell>
- <mxCell id="95" value="" style="strokeWidth=2;sharp=1;" parent="1" source="42" target="94" 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="97" value="" style="strokeWidth=2;sharp=1;" parent="1" source="2" target="30" 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="101" value="" style="strokeWidth=2;sharp=1;" edge="1" parent="1" source="21" target="23">
- <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>
|