|
- <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="280" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"shape":"start"}
- </JsonProperty>
- </mxCell>
- <mxCell id="7" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="440" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="9" value="开始抓取" style="request" parent="1" vertex="1">
- <mxGeometry x="570" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"500","timeout":"","response-charset":"","retryCount":"","retryInterval":"","header-name":["referer"],"header-description":[""],"body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\"https://cn.bing.com/search?q=\"+keyword+\"&filters=ex1%3a%22ez1%22&qs=SC&pq=nan&sc=10-3&cvid=005140B2204F4959940C48CB10B385E0&sp=1&first=\"+(page * 10+1)+\"&FORM=PERE\"}","proxy":"","header-value":["https://cn.bing.com/search?q=%e5%8d%97%e4%ba%ac&filters=ex1%3a%22ez1%22&qs=SC&pq=nan&sc=10-3&cvid=005140B2204F4959940C48CB10B385E0&sp=1&first=21&FORM=PERE1"],"request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}
- </JsonProperty>
- </mxCell>
- <mxCell id="10" value="" style="strokeWidth=2;sharp=1;" parent="1" source="7" target="9" 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="150" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="710" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["datalist"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${resp.selectors(\"#b_results > li\")}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="186" value="" style="strokeWidth=2;sharp=1;" parent="1" source="2" target="7" 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="188" value="输出" style="output" parent="1" vertex="1">
- <mxGeometry x="960" y="190" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["title","url","source","publish_time","abstract","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)}","${''}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}
- </JsonProperty>
- </mxCell>
- <mxCell id="192" value="" style="strokeWidth=2;sharp=1;" parent="1" source="9" target="150" 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="193" value="循环" style="loop" parent="1" vertex="1">
- <mxGeometry x="820" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"循环","loopItem":"","loopVariableName":"i","loopCount":"${datalist.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}
- </JsonProperty>
- </mxCell>
- <mxCell id="194" value="" style="strokeWidth=2;sharp=1;" parent="1" source="150" target="193" 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="195" value="定义变量" style="variable" parent="1" vertex="1">
- <mxGeometry x="960" y="80" width="32" height="32" as="geometry"/>
- <JsonProperty as="data">
- {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","url","abstract"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist.get(i).selector('.b_title > h2 > a').text()}","${datalist.get(i).selector('.b_title > h2 > a').attr('href')}","${datalist.get(i).selector('.b_caption p').text()}"],"shape":"variable"}
- </JsonProperty>
- </mxCell>
- <mxCell id="196" value="" style="strokeWidth=2;sharp=1;" parent="1" source="193" target="195" 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="197" value="" style="strokeWidth=2;sharp=1;" parent="1" source="195" target="188" 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>
|