18 lines
9.8 KiB
SQL
18 lines
9.8 KiB
SQL
SET FOREIGN_KEY_CHECKS=0;
|
|
|
|
DROP TABLE IF EXISTS `sp_flow`;
|
|
CREATE TABLE `sp_flow` (
|
|
`id` varchar(32) NOT NULL,
|
|
`name` varchar(64) DEFAULT NULL,
|
|
`xml` longtext,
|
|
`cron` varchar(255) DEFAULT NULL,
|
|
`enabled` char(1) DEFAULT '0',
|
|
`create_date` datetime DEFAULT CURRENT_TIMESTAMP,
|
|
`last_execute_time` datetime DEFAULT NULL,
|
|
`next_execute_time` datetime DEFAULT NULL,
|
|
`execute_count` int(8) DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
INSERT INTO `sp_flow` VALUES ('b45fb98d2a564c23ba623a377d5e12e9', '爬取码云GVP', '<mxGraphModel>\n <root>\n <mxCell id=\"0\">\n <JsonProperty as=\"data\">\n {"spiderName":"爬取码云GVP","threadCount":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"1\" parent=\"0\"/>\n <mxCell id=\"2\" value=\"开始\" style=\"start\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"80\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"shape":"start"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"5\" value=\"抓取首页\" style=\"request\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"180\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"抓取首页","loopVariableName":"","sleep":"","timeout":"","response-charset":"","method":"GET","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"https://gitee.com/gvp/all","proxy":"","request-body":[""],"follow-redirect":"1","shape":"request"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"6\" value=\"\" parent=\"1\" source=\"2\" target=\"5\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"7\" value=\"提取项目名、地址\" style=\"variable\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"330\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"提取项目名、地址","loopVariableName":"","variable-name":["projectUrls","projectNames"],"loopCount":"","variable-value":["${extract.selectors(resp.html,'.categorical-project-card a','attr','href')}","${extract.selectors(resp.html,'.project-name')}"],"shape":"variable"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"8\" value=\"\" parent=\"1\" source=\"5\" target=\"7\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"9\" value=\"抓取详情页\" style=\"request\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"450.16668701171875\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"抓取详情页","loopVariableName":"projectIndex","sleep":"","timeout":"","response-charset":"","method":"GET","body-type":"none","body-content-type":"text/plain","loopCount":"10","url":"https://gitee.com/${projectUrls[projectIndex]}","proxy":"","request-body":[""],"follow-redirect":"1","shape":"request"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"10\" value=\"\" parent=\"1\" source=\"7\" target=\"9\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"12\" value=\"提取项目描述\" style=\"variable\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"550\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"提取项目描述","loopVariableName":"","variable-name":["projectDesc"],"loopCount":"","variable-value":["${extract.selector(resp.html,'.git-project-desc-text')}"],"shape":"variable"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"13\" value=\"\" parent=\"1\" source=\"9\" target=\"12\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"14\" value=\"输出\" style=\"output\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"660.1666870117188\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"输出","output-name":["项目名","项目地址","项目描述"],"output-value":["${projectNames[projectIndex]}","https://gitee.com${projectUrls[projectIndex]}","${projectDesc}"],"shape":"output"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"15\" value=\"\" parent=\"1\" source=\"12\" target=\"14\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n </root>\n</mxGraphModel>\n', null, '0', '2019-08-22 13:46:54', null, null, null);
|
|
INSERT INTO `sp_flow` VALUES ('f0a67f17ee1a498a9b2f4ca30556f3c3', '抓取每日菜价', '<mxGraphModel>\n <root>\n <mxCell id=\"0\">\n <JsonProperty as=\"data\">\n {"spiderName":"抓取每日菜价","threadCount":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"1\" parent=\"0\"/>\n <mxCell id=\"2\" value=\"开始\" style=\"start\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"80\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"shape":"start"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"3\" value=\"开始抓取\" style=\"request\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"219.83334350585938\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"开始抓取","loopVariableName":"","sleep":"","timeout":"","response-charset":"","method":"GET","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"http://www.beijingprice.cn:8086/price/priceToday/PageLoad/LoadPrice?jsoncallback=1","proxy":"","request-body":[""],"follow-redirect":"1","shape":"request"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"4\" value=\"\" parent=\"1\" source=\"2\" target=\"3\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"5\" value=\"解析JSON\" style=\"variable\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"350\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"解析JSON","loopVariableName":"","variable-name":["jsonstr","jsondata","data"],"loopCount":"","variable-value":["${string.substring(resp.html,2,resp.html.length()-1)}","${json.parse(jsonstr)}","${extract.jsonpath(jsondata[0],'data')}"],"shape":"variable"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"6\" value=\"\" parent=\"1\" source=\"3\" target=\"5\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"7\" value=\"输出\" style=\"output\" parent=\"1\" vertex=\"1\">\n <mxGeometry x=\"480.16668701171875\" y=\"80\" width=\"24\" height=\"24\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"输出","loopVariableName":"i","output-name":["菜名","菜价","单位"],"loopCount":"${list.length(data)}","output-value":["${data[i].ItemName}","${data[i].Price04}","${data[i].ItemUnit}"],"shape":"output"}\n </JsonProperty>\n </mxCell>\n <mxCell id=\"8\" value=\"\" parent=\"1\" source=\"5\" target=\"7\" edge=\"1\">\n <mxGeometry relative=\"1\" as=\"geometry\"/>\n <JsonProperty as=\"data\">\n {"value":"","condition":""}\n </JsonProperty>\n </mxCell>\n </root>\n</mxGraphModel>\n', null, '0', '2019-08-22 13:48:22', null, null, null); |