diff --git a/initialize_db_cache.sh b/initialize_db_cache.sh index 065c3fb..7cb4cde 100644 --- a/initialize_db_cache.sh +++ b/initialize_db_cache.sh @@ -748,4 +748,48 @@ CREATE TABLE `wechatqrcode` ( UNIQUE KEY `uniquestr` (`telephone`) ) ENGINE=InnoDB AUTO_INCREMENT=32124 DEFAULT CHARSET=utf8mb4; + + + + + + +-- ---------------------------- +-- Table structure for templete +-- ---------------------------- +DROP TABLE IF EXISTS `templete`; +CREATE TABLE `templete` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `engine` varchar(255) DEFAULT NULL COMMENT '搜索引擎', + `templete_id` int(11) DEFAULT NULL COMMENT '模版ID', + `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `status` int(11) DEFAULT '1' COMMENT '状态', + `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', + `xml` longtext COMMENT 'xml文件', + `type` int(11) DEFAULT NULL COMMENT '类型', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4; + +-- ---------------------------- +-- Records of templete +-- ---------------------------- +BEGIN; +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (1, '微信搜索', NULL, '2022-10-20 20:23:06', 1, '2022-10-20 20:23:06', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["dataJson"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${ resp.html.json().data.data }"],"shape":"variable"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["page","keyword"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${pageNoData}","北京"],"shape":"variable"}\n \n \n \n \n \n {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${'https://www.chinaso.com/v5/general/v1/web/search?q=site:mp.weixin.qq.com+'+keyword+'&pn='+page+'&ps=15&bid=4151016307959391'}","proxy":"","request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"i","loopCount":"${ dataJson.size() }","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","url","source","publish_time","abstract","author"],"variable-description":["","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${strUtils.contains(dataJson[i].title,keyword)?(strUtils.replaceAll(dataJson[i].title,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(dataJson[i].title)}","${ dataJson[i].url }","${ dataJson[i].source }","${dateUtils.stampToDate(dataJson[i].timestamp+'000')}","${strUtils.contains( dataJson[i].snippet ,keyword)?(strUtils.replaceAll( dataJson[i].snippet ,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(dataJson[i].snippet)}","${'-'}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["title","url","source","publish_time","abstract","author"],"loopCount":"","output-value":["${title}","${url}","${\\"微信公众号\\"}","${publish_time}","${abstract}","${author}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n', 2); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (2, '微博搜索', 135284895, '2022-10-21 11:14:33', 1, '2022-10-21 11:14:33', '\r\n \r\n \r\n \r\n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {"shape":"start"}\r\n \r\n \r\n \r\n \r\n \r\n {"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"}\r\n \r\n \r\n \r\n \r\n \r\n {"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"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"自定义的关键词","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","pageNo"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["南京","${pageNoData}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"z","loopCount":"${parseArray}","loopStart":"0","loopEnd":"-1","awaitSleep":"100","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["jsonobject"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${parseArray.getJSONObject(z)}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"含有card_group","loopVariableName":"","ziloopVariableName":"","variable-name":["cardgrouparray"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${jsonobject.getJSONArray(\\"card_group\\")}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"判断关键字,确定json类型","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"${jsonobject.containsKey(\\"card_group\\") == true}","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"index","loopCount":"${cardgrouparray.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"300","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"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"}\r\n \r\n \r\n \r\n \r\n \r\n {"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"}\r\n \r\n \r\n \r\n \r\n \r\n {"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"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"2","lineWidth":"2","line-style":"sharp","lineColor":"#00ff00","condition":"${jsonobject.containsKey(\\"card_group\\") == false}","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"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"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n\r\n', 2); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (3, '百度资讯搜索', 135284882, '2022-10-20 11:26:38', 1, '2022-10-20 11:26:38', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"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"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["titles","urls","times","sources","totals","total","pages","pages","abstracts"],"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()}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"j","loopCount":"${titles.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","url","source","time","time","time","publish_time","abstract"],"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]}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page","startIndex"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}","${page=='0'?'':(page-1)}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"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}","${source}","${publish_time}","${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"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":[""],"loopCount":"","output-value":["${\\"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\\"}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n', 1); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (4, '头条搜索', 135284892, '2022-10-24 16:30:22', 1, '2022-10-24 16:30:22', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"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":"${'https://so.toutiao.com/search?keyword='+keyword+'&pd=information&source=search_subtab_switch&dvpf=pc&aid=4916&page_num='+(page-1)}","proxy":"","cookie-value":["MONITOR_WEB_ID=7136060905808446989; _S_DPR=2; _S_IPAD=0; _S_WIN_WH=1372_739; ttwid=1%7CDU8QP2eAdg2wjFnB_ggNlqGibkM_DPTXGw1bvFbqUt8%7C1661493660%7C3e9e6f880b1d240b10612e18d44b39f2787f082f5438e6719efbb984559f96f4"],"request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["page","keyword"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${pageNoData}","北京"],"shape":"variable"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["orignalhtml","datalist"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html}","${orignalhtml.selectors('script[data-for=s-result-json]')}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"j","loopCount":"${datalist.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["html","sub_html","data_json_object","title","source_url","datetime","media_name","abstract","imgurl","videojson","imglist","imgjson","","","",""],"variable-description":["","","","","","","","","","","","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist[j]+''}","${strUtils.substring(html,strUtils.indexOf(html,'\\"hydrate\\">')+10,strUtils.length(html)-9)}","${jsonUtils.parseObject(sub_html)}","${data_json_object.data.title}","${data_json_object.data.source_url}","${data_json_object.data.datetime}","${data_json_object.data.media_name}","${data_json_object.data.abstract}","${data_json_object.data.image_url}","${jsonUtils.createJsonObject()}","${jsonUtils.createJsonArray()}","${jsonUtils.createJsonObject()}","${imgjson.put(\\"imgurl\\",imgurl)}","${imglist.add(imgjson)}","${videojson.put(\\"imglist\\",imglist)}","${videojson.put(\\"vediourl\\",'')}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["title","source_url","datetime","datalist"],"loopCount":"","output-value":["${title}","${source_url}","${datetime}","${data_json_object}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","classify","website_id","websitelogo"],"variable-description":["","","",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json.new_website_type}","${json.id}","${json.website_ico}"],"shape":"variable"}\n \n \n \n \n \n {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["",""],"loopCount":"","output-value":["${resp.html}","${url}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"修改关键词状态","loopVariableName":"","method":"GET","sleep":"","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"http://192.168.71.61:6135/spider_factory/baidu/keywordStatus?keyword=\\"+keyword}","proxy":"","request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"http://192.168.71.61:6135/spider_factory/baidu/keywordStatus?keyword=\\"+rs[i].keyword}","proxy":"","request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["title","url","publish_time","source","abstract","author","videojson"],"loopCount":"","output-value":["${strUtils.contains(title,keyword)?(strUtils.replaceAll(title,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(title)}","${source_url}","${datetime}","${'今日头条'}","${strUtils.contains(abstract,keyword)?(strUtils.replaceAll(abstract,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(abstract)}","${media_name}","${videojson}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"blue","condition":"${abstract!=null||title!=null}","transmit-variable":"1"}\n \n \n \n\n', 1); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (5, '百家号搜索', 135284910, '2022-10-20 19:30:03', 1, '2022-10-20 19:30:03', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"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=2&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"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["titles","urls","times","sources","totals","total","pages","pages","abstracts"],"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()}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"j","loopCount":"${titles.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","url","source","time","time","time","publish_time","abstract"],"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]}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page","startIndex"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}","${page=='0'?'':(page-1)}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"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}","${source}","${publish_time}","${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"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n', 1); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (6, '中国搜索', 135284909, '2022-10-20 19:30:05', 1, '2022-10-20 19:30:05', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["total_page","keyword"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${pageNoData}","北京"],"shape":"variable"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["list_data"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json().data.data}"],"shape":"variable"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"i","loopCount":"${list_data.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","title","summary","url","source","publish_time","extend","source_flag","site_name","snippet"],"variable-description":["标题","","摘要","原始链接","来源网站","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${strUtils.replaceAll(list_data[i].title,'<em>','')}","${strUtils.replaceAll(title,'</em>','')}","${list_data[i].snippet}","${list_data[i].url}","${list_data[i].source}","${dateUtils.stampToDate(list_data[i].timestamp+'000')}","${list_data[i].extend}","${strUtils.indexOf(extend,'site_name')}","${source_flag!=-1?(list_data[i].extend.json().site_name):source}","${list_data.get(i).snippet}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"","timeout":"","response-charset":"","retryCount":"","retryInterval":"","cookie-name":["Cookie"],"cookie-description":[""],"header-name":["Host"],"header-description":[""],"body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${'http://www.chinaso.com/v5/general/v1/web/search?q='+keyword+'&pn='+total_page+'&ps=15&force=0&stime=24h&etime=now'}","proxy":"","cookie-value":["uid=CgqASWJmH0KGd3qqDSdIAg==; cookie_name=122.96.102.43.1650859843374970; wdcid=7e72f38d9bc6dc56; wdlast=1652238633; Hm_lvt_91fa1aefc990a9fc21c08506e5983ddf=1652238633; __WWW_CARD__DISSTATUS__=false; __WWW_nav__DISSTATUS__=false; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%221805eea194944-0d246d8dddcd0b-535b0612-1296000-1805eea194a99e%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22%24device_id%22%3A%221805eea194944-0d246d8dddcd0b-535b0612-1296000-1805eea194a99e%22%7D"],"header-value":["www.chinaso.com"],"request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["url","title","source","publish_time","abstract","author"],"loopCount":"","output-value":["${url}","${strUtils.contains(title,keyword)?(strUtils.replaceAll(title,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(title)}","${source}","${publish_time}","${strUtils.contains(snippet,keyword)?(strUtils.replaceAll(snippet,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(snippet)}","${'-'}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"输出","loopVariableName":"","tableName":"","csvName":"","csvEncoding":"GBK","output-name":["content"],"loopCount":"","output-value":["${content}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n', 1); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (7, '新浪搜索', 135284922, '2022-10-20 21:45:41', 1, '2022-10-20 21:45:41', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["authorName","publish_time","source_url","title","source","summary"],"variable-description":["","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist1.get(k).fields.AuthorName}","${dateUtils.stampToDate(datalist1.get(k).fields.PublishTime +'000')}","${datalist1.get(k).fields.url}","${datalist1.get(k).fields.title.replaceAll(\\"</?[^>]+>\\", \\"\\")}","${datalist1.get(k).fields.webname}","${datalist1.get(k).fields.summary}"],"shape":"variable"}\n \n \n \n \n \n {"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)}","${source_url}","${source}","${publish_time}","${strUtils.contains(summary,keyword)?(strUtils.replaceAll(summary,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(summary)}","${authorName}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"开始抓取","loopVariableName":"","method":"POST","sleep":"300","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"https://vtm.sm.cn/blm/vsearch-api-390/news?uc_param_str=dnntnwvepffrbijbprsvchgputdemennosstodcaaagidsdieinipi&start=\\"+(page*10)+\\"&method=hot_news&hit=10&query=\\"+keyword+\\"&hid=c1ba2f9f9e104793ad584ef09017d5d2&uuid=2c0fb4e4c3aeb7b59dc3b2795657e38b%7C%7C%7C1661225116\\"}","proxy":"","request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","datalist1"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json.data.list}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${datalist1.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n', 1); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (8, '神马搜索', 135284923, '2022-10-20 19:30:36', 1, '2022-10-20 19:30:36', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["authorName","publish_time","source_url","title","source","summary"],"variable-description":["","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist1.get(k).fields.AuthorName}","${dateUtils.stampToDate(datalist1.get(k).fields.PublishTime +'000')}","${datalist1.get(k).fields.url}","${datalist1.get(k).fields.title.replaceAll(\\"</?[^>]+>\\", \\"\\")}","${datalist1.get(k).fields.webname}","${datalist1.get(k).fields.summary}"],"shape":"variable"}\n \n \n \n \n \n {"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)}","${source_url}","${source}","${publish_time}","${strUtils.contains(summary,keyword)?(strUtils.replaceAll(summary,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(summary)}","${authorName}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"开始抓取","loopVariableName":"","method":"POST","sleep":"300","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"https://vtm.sm.cn/blm/vsearch-api-390/news?uc_param_str=dnntnwvepffrbijbprsvchgputdemennosstodcaaagidsdieinipi&start=\\"+(page*10)+\\"&method=hot_news&hit=10&query=\\"+keyword+\\"&hid=c1ba2f9f9e104793ad584ef09017d5d2&uuid=2c0fb4e4c3aeb7b59dc3b2795657e38b%7C%7C%7C1661225116\\"}","proxy":"","request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","datalist1"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json.data.list}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${datalist1.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n', 1); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (9, 'bing搜索', 135284916, '2022-10-20 19:30:41', 1, '2022-10-20 19:30:41', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}\n \n \n \n \n \n {"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"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["datalist"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${resp.selectors(\\"#b_results > li\\")}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"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"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"i","loopCount":"${datalist.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"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"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n', 1); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (10, '百度热议', 135284938, '2022-10-21 13:56:17', 1, '2022-10-21 13:56:17', '\r\n \r\n \r\n \r\n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {"shape":"start"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","pageNo","start_page"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}","${pageNo==1?1:(pageNo*10)}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"结果发送","redis":"","redis-send":"0","output-name":["title","publish_time","contenthtml","content","source_url","author","author_url","author_avatar","classify","similarvolume","heatvolume","spider_time","publish_date","publishdate","article_public_id","hbase_table","es_index","seed_id","otherseedid","website_id","otherwebsiteid","source_name","websitelogo","sourcewebsitename","extend_string_five","bloomName","seedname"],"output-value":["${title}","${publish_time}","${contenthtml}","${content}","${source_url}","${authorName}","","","${classify}","${similarvolume}","${heatvolume}","${dateUtils.getDate()}","${dateUtils.getDateday()}","${dateUtils.getDateday()}","${md5Utils.getMD5(source_url)}","${hbase_table}","${es_index}","${seed_id}","135284085","${website_id}","${otherwebsiteid}","${source}","${websitelogo}","${source}","${extend_string_five}","${bloomName}","${keyword}"],"shape":"redisSend"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["author","author_url","publish_time","source_url","title","content","praisevolume","forwardingvolume","commentsvolume","pics","imglist","videojson","source","abstract"],"variable-description":["","","","","","","点赞量","转发量","评论量","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist.get(k).nick}","${datalist.get(k).userHomeUrl}","${dateUtils.stampToDate(datalist.get(k).pubUnixTime +'000')}","${datalist.get(k).url}","${datalist.get(k).nick}","${datalist.get(k).originContent}","${datalist.get(k).result_hudong_data.like_num}","${datalist.get(k).transmitNum == -1 ? 0 : datalist.get(k).transmitNum}","${datalist.get(k).commentNum}","${datalist.get(k).thumbImgList}","${jsonUtils.createJsonArray()}","${jsonUtils.createJsonObject()}","${datalist.get(k).source}","${content.length() <= 200 ? content : content.substring(0,200)}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"300","timeout":"","response-charset":"","retryCount":"","retryInterval":"","cookie-name":["Cookie"],"cookie-description":[""],"header-name":["Referer"],"header-description":[""],"body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"https://m.baidu.com/sf/vsearch?word=\\"+keyword+\\"&pd=realtime_ugc&pn=\\"+start_page+\\"&sa=3&mod=5&p_type=1&data_type=json&atn=list&lid=8455814798637374645\\"}","proxy":"","cookie-value":["BIDUPSID=FFCCEFFD6AD71B7D82B27246697129D3; PSTM=1659250032; BAIDUID=FFCCEFFD6AD71B7D5B6D8FB6AB4134D0:FG=1; BDUSS=TVPeXdPMkFXR1BsM3RTeW1wQ3g4WEtCQkR6Y05FVVNUS3JNZjVtV0p3UjdiaEJqRVFBQUFBJCQAAAAAAAAAAAEAAAB~B2D2tcjIscqntcSwrgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHvh6GJ74ehiY; BDUSS_BFESS=TVPeXdPMkFXR1BsM3RTeW1wQ3g4WEtCQkR6Y05FVVNUS3JNZjVtV0p3UjdiaEJqRVFBQUFBJCQAAAAAAAAAAAEAAAB~B2D2tcjIscqntcSwrgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHvh6GJ74ehiY; BDSFRCVID=0E0OJeC626e3FLTDUk17hfyjJB4YyWRTH6aoeuyE9jpQIjtij9uiEG0P5f8g0K4bGelBogKKL2OTHm_F_2uxOjjg8UtVJeC6EG0Ptf8g0f5; H_BDCLCKID_SF=tJIJ_ID2JCD3H48k-4QEbbQH-UnLq5DJLgOZ04n-ah02Mljc-xOl3fTyMMj8afIHW20jbUjm3UTKsq76Wh35K5tTQP6rLttOb6c4KKJxbpbG8J5IytKaQMu3hUJiBMAHBan7Wx7IXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbC_Gj58aj5QLeU5eetjK2CntsJOOaCvAMqOOy4oWK441DajCa-jRQGTDKRnDMRckhlvoDh3G3M04K4o9-hvT-54e2p3FBUQjb-5CQft20b0v0tc-KfcatmnuLn7jWhvdhl72y-crQlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8IjHCHt60JtRPtoCvj24bqejrnhPF3DhobXP6-hnjy3b4q5Rvt3U52qCQdbRr8y6DUyN3TQl3Ry6r4_MjIQJT6_U8zbMj4-Tk054oxJpOJ3N6u0RQYKDjU8tbvbURvX5Dg3-7LyM5dtjTO2bc_5KnlfMQ_bf--QfbQ0hOhqP-jBRIEoDK2JIDMMDDrbPrMbtQH-UnLq5JKtgOZ04n-ah02Mljc-xOlMT00MMj8afIHW20jbUjm3UTKsD3hQljE0p49qfOlLttOb6c4KKJxbpbG8J5IytKaQMu3hUJiBMAHBan7Wx7IXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbC8lj5DMj6cXepJf-K6W5IO2Q5rJaDk2sDJOy4oTj6jBbHblWp3RQC0D_bnDMRckECbX2qJC3MvB-fn--Rc4fCQjblT_bnT8bt5YQft205LEeMtjB53a3KTQ5J7jWhvdhl72y-crQlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8EjH62btt_tR-q_IQP; POLYFILL=0; BDORZ=FFFB88E999055A3F8A630C64834BD6D0; delPer=0; PSINO=3; BAIDUID_BFESS=FFCCEFFD6AD71B7D5B6D8FB6AB4134D0:FG=1; BDSFRCVID_BFESS=0E0OJeC626e3FLTDUk17hfyjJB4YyWRTH6aoeuyE9jpQIjtij9uiEG0P5f8g0K4bGelBogKKL2OTHm_F_2uxOjjg8UtVJeC6EG0Ptf8g0f5; H_BDCLCKID_SF_BFESS=tJIJ_ID2JCD3H48k-4QEbbQH-UnLq5DJLgOZ04n-ah02Mljc-xOl3fTyMMj8afIHW20jbUjm3UTKsq76Wh35K5tTQP6rLttOb6c4KKJxbpbG8J5IytKaQMu3hUJiBMAHBan7Wx7IXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbC_Gj58aj5QLeU5eetjK2CntsJOOaCvAMqOOy4oWK441DajCa-jRQGTDKRnDMRckhlvoDh3G3M04K4o9-hvT-54e2p3FBUQjb-5CQft20b0v0tc-KfcatmnuLn7jWhvdhl72y-crQlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8IjHCHt60JtRPtoCvj24bqejrnhPF3DhobXP6-hnjy3b4q5Rvt3U52qCQdbRr8y6DUyN3TQl3Ry6r4_MjIQJT6_U8zbMj4-Tk054oxJpOJ3N6u0RQYKDjU8tbvbURvX5Dg3-7LyM5dtjTO2bc_5KnlfMQ_bf--QfbQ0hOhqP-jBRIEoDK2JIDMMDDrbPrMbtQH-UnLq5JKtgOZ04n-ah02Mljc-xOlMT00MMj8afIHW20jbUjm3UTKsD3hQljE0p49qfOlLttOb6c4KKJxbpbG8J5IytKaQMu3hUJiBMAHBan7Wx7IXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbC8lj5DMj6cXepJf-K6W5IO2Q5rJaDk2sDJOy4oTj6jBbHblWp3RQC0D_bnDMRckECbX2qJC3MvB-fn--Rc4fCQjblT_bnT8bt5YQft205LEeMtjB53a3KTQ5J7jWhvdhl72y-crQlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8EjH62btt_tR-q_IQP; ZFY=Mi38dpcGKjSMwZSjfhhoAT5HtSmpwJ0ExHmhmFYur9s:C; ZD_ENTRY=baidu; SE_LAUNCH=94%3A27693027; H_WISE_SIDS=110085_196428_209568_211986_212870_215730_216207_216941_219942_219946_220643_221006_221468_221909_222298_222333_222397_222468_222742_223063_223474_223906_224046_224055_224077_224084_224196_224376_224811_225515_225916_225954_226076_226103_226141_226331_226489_226723_226744; H_WISE_SIDS_BFESS=110085_196428_209568_211986_212870_215730_216207_216941_219942_219946_220643_221006_221468_221909_222298_222333_222397_222468_222742_223063_223474_223906_224046_224055_224077_224084_224196_224376_224811_225515_225916_225954_226076_226103_226141_226331_226489_226723_226744; BDRCVFR[C5g0hgaJYCf]=bvBYpeu9K4bTAR3Qh4-I0; H_PS_PSSID=; BA_HECTOR=850k848l8g0l2k8h0k04q5sd1hgjrod17; __bsi=7756444370040577615_00_17_N_R_677_0303_c02f_Y"],"header-value":["https://m.baidu.com/sf/vsearch?pd=realtime_ugc&word=%E5%85%B3%E9%94%AE%E8%AF%8D&tn=vsearch&sa=vs_tab&lid=8455814798637374645&ms=1&from=844b&atn=list"],"request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","datalist"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json.data.list}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${datalist.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"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)}","${source_url}","${source}","${publish_time}","${strUtils.contains(abstract,keyword)?(strUtils.replaceAll(abstract,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(abstract)}","${author}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n\r\n', 2); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (11, '小红书', 135284935, '2022-10-21 09:47:37', 1, '2022-10-21 09:47:37', '\n \n \n \n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\n \n \n \n \n \n \n {"shape":"start"}\n \n \n \n \n \n {"value":"开始抓取1","loopVariableName":"","method":"GET","sleep":"","timeout":"","response-charset":"utf-8","retryCount":"","retryInterval":"","cookie-name":["Cookie"],"cookie-description":[""],"header-name":["User-Agent"],"header-description":[""],"body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${'https://www.baidu.com/s?wd=site%3Axiaohongshu.com%20'+keyword+'&pn='+startIndex+'0&oq=site%3Axiaohongshu.com%20'+keyword+'&ie=utf-8&rsv_pq=e2f0a475000042c5&rsv_t=9ea9dVLpUJnYTMsMoLr%2FJEKf5u9kVwWw0ClcmcocojFr%2FDLXSOQyIydSLKU'}","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"],"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"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["datalist"],"variable-description":[""],"loopCount":"","ziloopCount":"","variable-value":["${resp.selectors('#content_left > div')}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page","startIndex"],"variable-description":["","",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}","${page=='0'?'':(page-1)}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"循环","loopItem":"","loopVariableName":"i","loopCount":"${datalist.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","url","source","publish_time","abstract"],"variable-description":["","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist.get(i).selector('.c-container > div > h3 > a').text()}","${datalist.get(i).selector('.c-container > div > h3 > a').attr('href')}","${\\"小红书\\"}","${datalist.get(i).selector('.c-color-gray2').text()}","${datalist.get(i).selector('.content-right_8Zs40').text()}"],"shape":"variable"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n \n \n {"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}","${source}","${publish_time}","${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"}\n \n \n \n \n \n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\n \n \n \n', 2); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (12, '财联社-资讯', 135284931, '2022-10-21 11:26:26', 1, '2022-10-21 11:26:26', '\r\n \r\n \r\n \r\n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {"shape":"start"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","source_url","publish_time","descr","descr_temp","descr_data","abstract"],"variable-description":["","","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${dataList.get(k).title}","${\\"https://www.cls.cn/detail/\\" + dataList.get(k).id}","${dateUtils.stampToDate(dataList.get(k).time +'000')}","${dataList.get(k).descr}","${strUtils.replaceAll(descr,'<em>','')}","${strUtils.replaceAll(descr_temp,'</em>','')}","${descr_data.length() <= 200 ? descr_data : descr_data.substring(0,200)}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"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)}","${source_url}","${\\"财联社\\"}","${publish_time}","${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"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"开始抓取","loopVariableName":"","method":"POST","sleep":"","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"raw","body-content-type":"application/json","loopCount":"","url":"${\\"https://www.cls.cn/api/sw?app=CailianpressWeb&os=web&sv=7.7.5&sign=bf0f367462d8cd70917ba5eab3853bce\\"}","proxy":"","request-body":"${'{\\"type\\":\\"depth\\",\\"keyword\\":\\"'+keyword+'\\",\\"page\\":'+(page-1)+',\\"rn\\":10,\\"os\\":\\"web\\",\\"sv\\":\\"7.7.5\\",\\"app\\":\\"CailianpressWeb\\"}'}","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","dataList"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json.data.depth.data}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${dataList.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n\r\n', 3); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (13, '东方财富', 135284924, '2022-10-21 10:11:31', 1, '2022-10-21 10:11:31', '\r\n \r\n \r\n \r\n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {"shape":"start"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["source_url","publish_time","title","art_content"],"variable-description":["","","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist.get(k).Art_Url}","${datalist.get(k).Art_CreateTime}","${datalist.get(k).Art_Title}","${datalist.get(k).Art_Content}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"","timeout":"","response-charset":"","retryCount":"","retryInterval":"","header-name":["Referer"],"header-description":[""],"body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"https://searchapi.eastmoney.com/bussiness/Web/GetCMSSearchList?cb=jQuery35109950760626122721_1661172543372&keyword=\\"+keyword+\\"&type=8193&pageindex=\\"+(page)+\\"&pagesize=10&name=web&_=1661172543407\\"}","proxy":"","header-value":["https://so.eastmoney.com/"],"request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","datalist"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.substring(41,resp.html.length()-1).json()}","${json.Data}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${datalist.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"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)}","${source_url}","${'东方财富'}","${publish_time}","${strUtils.contains(art_content,keyword)?(strUtils.replaceAll(art_content,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(art_content)}","${'-'}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n\r\n', 3); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (14, '格隆汇-快讯', 135284930, '2022-10-21 10:10:00', 1, '2022-10-21 10:10:00', '\r\n \r\n \r\n \r\n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {"shape":"start"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","publish_time","source_url","source","contentDisp","content"],"variable-description":["","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${datalist.get(k).title.substring(1,datalist.get(k).title.length()-1)}","${dateUtils.stampToDate(datalist.get(k).createTime +'000')}","${\\"https://www.gelonghui.com/live/\\"+datalist.get(k).id}","${datalist.get(k).stocks.get(0).stockName}","${strUtils.replaceAll(datalist.get(k).contentDisp,'<hl>','')}","${strUtils.replaceAll(contentDisp,'</hl>','')}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"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)}","${source_url}","${source}","${publish_time}","${strUtils.contains(content,keyword)?(strUtils.replaceAll(content,keyword,'<b class=\\"key\\" style=\\"color:red\\">'+keyword+'</b>')):(content)}","${'-'}"],"output-all":"0","output-database":"0","output-csv":"0","shape":"output"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"300","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"https://www.gelonghui.com/api/live/search/v2?keyword=\\"+keyword+\\"&page=\\"+(page)+\\"&count=10\\"}","proxy":"","request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","datalist"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json.result}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${datalist.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n\r\n', 3); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (15, '格隆汇-文章', 135284925, '2022-10-21 13:52:14', 1, '2022-10-21 13:52:14', '\r\n \r\n \r\n \r\n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {"shape":"start"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","${pageNoData}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["title","source_url","publish_time","summary","abstract1","abstract","source"],"variable-description":["","","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${dataList.get(k).title.replaceAll(\\"</?[^>]+>\\", \\"\\")}","${dataList.get(k).link}","${dateUtils.stampToDate(dataList.get(k).createTimestamp +'000')}","${dataList.get(k).summary}","${summary.length() <= 200 ? summary : summary.substring(0,200)}","${abstract1.replaceAll(\\"</?[^>]+>\\", \\"\\")}","${dataList.get(k).source}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"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)}","${source_url}","${source}","${publish_time}","${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"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"开始抓取","loopVariableName":"","method":"GET","sleep":"300","timeout":"","response-charset":"","retryCount":"","retryInterval":"","body-type":"none","body-content-type":"text/plain","loopCount":"","url":"${\\"https://www.gelonghui.com/api/post/search/v4?keyword=\\"+keyword+\\"&isVipArticle=false&count=10&page=\\"+(page)+\\"&searchArea=title\\"}","proxy":"","request-body":"","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json","dataList"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json.result}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${dataList.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n\r\n', 3); +INSERT INTO `templete` (`id`, `engine`, `templete_id`, `update_time`, `status`, `create_time`, `xml`, `type`) VALUES (16, '财联社-电报', 135284911, '2022-10-21 13:50:01', 1, '2022-10-21 13:50:01', '\r\n \r\n \r\n \r\n {"spiderName":"未定义名称","submit-strategy":"random","threadCount":"1"}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {"shape":"start"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["keyword","page"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["北京","1"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"开始抓取","loopVariableName":"","method":"POST","sleep":"300","timeout":"","response-charset":"","retryCount":"","retryInterval":"","header-name":["cookie"],"header-description":[""],"body-type":"raw","body-content-type":"application/json","loopCount":"","url":"${\\"https://www.cls.cn/api/sw?app=CailianpressWeb&os=web&sv=7.7.5&sign=bf0f367462d8cd70917ba5eab3853bce\\"}","proxy":"","header-value":["${cookie}"],"request-body":"${'{\\"type\\":\\"telegram\\",\\"keyword\\":\\"'+keyword+'\\",\\"page\\":'+page+',\\"rn\\":10,\\"os\\":\\"web\\",\\"sv\\":\\"7.7.5\\",\\"app\\":\\"CailianpressWeb\\"}'}","follow-redirect":"1","tls-validate":"1","cookie-auto-set":"1","repeat-enable":"0","shape":"request"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["source_url","publish_time","title1","title2","title","abstract1","abstract2","abstract"],"variable-description":["","","","","","","",""],"loopCount":"","ziloopCount":"","variable-value":["${\\"https://www.cls.cn/detail/\\" + dataList.get(k).id}","${dateUtils.stampToDate( dataList.get(k).time +'000')}","${dataList.get(k).descr}","${title1.substring(1,title1.indexOf('】'))}","${title2.replaceAll(\\"</?[^>]+>\\", \\"\\")}","${dataList.get(k).descr}","${abstract1.length() <= 200 ? abstract1 : abstract1.substring(0,200)}","${abstract2.replaceAll(\\"</?[^>]+>\\", \\"\\")}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"定义变量","loopVariableName":"","ziloopVariableName":"","variable-name":["json1","dataList"],"variable-description":["",""],"loopCount":"","ziloopCount":"","variable-value":["${resp.html.json()}","${json1.data.telegram.data}"],"shape":"variable"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"循环","loopItem":"","loopVariableName":"k","loopCount":"${dataList.size()}","loopStart":"0","loopEnd":"-1","awaitSleep":"0","shape":"loop"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"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)}","${source_url}","${'格隆汇'}","${publish_time}","${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"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n \r\n \r\n {"value":"","exception-flow":"0","lineWidth":"2","line-style":"sharp","lineColor":"black","condition":"","transmit-variable":"1"}\r\n \r\n \r\n \r\n\r\n', 3); +COMMIT; + SET FOREIGN_KEY_CHECKS = 1; diff --git a/pom.xml b/pom.xml index cc9d95c..d18a5fb 100644 --- a/pom.xml +++ b/pom.xml @@ -212,6 +212,15 @@ hanlp portable-1.8.2 + + + org.java-websocket + Java-WebSocket + 1.3.8 + + + + diff --git a/src/main/java/com/stonedt/intelligence/controller/TimelySearchController.java b/src/main/java/com/stonedt/intelligence/controller/TimelySearchController.java new file mode 100644 index 0000000..997ad72 --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/controller/TimelySearchController.java @@ -0,0 +1,419 @@ +package com.stonedt.intelligence.controller; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.stonedt.intelligence.aop.SystemControllerLog; +import com.stonedt.intelligence.entity.FullPolymerization; +import com.stonedt.intelligence.entity.FullType; +import com.stonedt.intelligence.entity.FullWord; +import com.stonedt.intelligence.entity.TimelyPolymerization; +import com.stonedt.intelligence.entity.User; +import com.stonedt.intelligence.service.FullSearchService; +import com.stonedt.intelligence.service.TimelysearchService; +import com.stonedt.intelligence.util.DateUtil; +import com.stonedt.intelligence.util.TxtUtil; +import com.stonedt.intelligence.util.UserUtil; +import com.stonedt.intelligence.vo.FullSearchParam; +import com.stonedt.intelligence.websocket.WebSocketUtils; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; + +import java.io.File; +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 全文搜索控制器 + */ +@Controller +@RequestMapping(value = "/timelysearch") +public class TimelySearchController { + + @Value("${xmlFilePath}") + private String xmlPath; + + + + + @Autowired + private FullSearchService fullSearchService; + + @Autowired + private TimelysearchService searchearchService; + + + + @Autowired + UserUtil userUtil; + + /** + * 全文搜索页面 + */ + @SystemControllerLog(module = "全文搜索", submodule = "全文搜索", type = "全文搜索页面", operation = "search") + @GetMapping(value = "") + public String search(Integer full_poly, @RequestParam(defaultValue = "1") Integer full_type, Model model) { + model.addAttribute("fulltype", full_type); + model.addAttribute("full_poly", full_poly); + model.addAttribute("menu", "full_search"); + return "timely_search/full_search"; + } + + /** + * 全文搜索结果页面 + */ + @GetMapping(value = "/result") + @SystemControllerLog(module = "全文搜索", submodule = "搜索结果", type = "查询", operation = "result") + public String result(@RequestParam(value = "menuStyle", required = false, defaultValue = "1") Integer menuStyle, + @RequestParam(value = "pageSize", required = false, defaultValue = "50") Integer pageSize, + Integer full_poly, String fulltype, @RequestParam(value = "keyword", required = false, defaultValue = "疫情")String keyword, + String sourcename, Integer page, Model model, + HttpServletRequest request, + @RequestParam(value = "website_id", required = false, defaultValue = "0") String website_id, + @RequestParam(value = "stype", required = false, defaultValue = "1") String stype, + @RequestParam(value = "pageNoData", required = false, defaultValue = "1") String pageNoData) { + model.addAttribute("searchWord", keyword);//搜索关键词 + model.addAttribute("page", page); + model.addAttribute("source_name", sourcename); + model.addAttribute("fulltype", fulltype);//搜索引擎类型 + model.addAttribute("full_poly", full_poly); + model.addAttribute("menuStyle", menuStyle); + model.addAttribute("website_id", website_id); + model.addAttribute("stype", stype); + model.addAttribute("pageNoData", pageNoData); + + model.addAttribute("pageSize", pageSize); + model.addAttribute("menu", "full_search"); + + //将搜索的词存到数据库 + User user = userUtil.getuser(request); + String user_id = String.valueOf(user.getUser_id()); + String create_time = DateUtil.getNowTime(); + + if (!keyword.equals("")) { + FullWord fullWord = new FullWord(); + fullWord.setUser_id(Long.valueOf(user_id)); + fullWord.setCreate_time(create_time); + fullWord.setSearch_word(keyword); + boolean result = fullSearchService.saveFullWord(fullWord); + } + return "timely_search/search_result"; + } + + + + /** + * 资讯数据列表 + */ +// @SystemControllerLog(module = "全文搜索", submodule = "资讯列表", type = "查询", operation = "informationList") +// @GetMapping(value = "/informationList") +// public @ResponseBody +// JSONObject informationList(FullSearchParam informationListParam) { +// +// +// JSONObject informationList = fullSearchService.informationList(informationListParam); +// +// return informationList; +// } + + + + /** + * 资讯数据列表 + */ +// @SystemControllerLog(module = "全文搜索", submodule = "资讯列表", type = "查询", operation = "informationList1") +// @PostMapping(value = "/informationListpost") +// public @ResponseBody +// JSONObject informationList1(@RequestBody FullSearchParam informationListParam) { +// +// +// informationListParam.setMatchType(1); +// informationListParam.setSortType(1); +// informationListParam.setMergeType(0); +// +// JSONObject informationList = fullSearchService.informationListSearch(informationListParam); +// +// return informationList; +// } + + /** + * @param [articleid, groupid, projectid, menu, mv] + * @return org.springframework.web.servlet.ModelAndView + * @description: 跳转 资讯文章详情页面
+ * @version: 1.0
+ * @date: 2020/4/13 14:32
+ * @author: huajiancheng
+ */ +// @SystemControllerLog(module = "全文搜索", submodule = "资讯文章详情", type = "查询", operation = "thesisnDetail") +// @GetMapping(value = "/detail/{articleid}") +// public ModelAndView skiparticle(@PathVariable() String articleid, +// String groupid, String projectid, String relatedWord, +// String menu, String page, ModelAndView mv, +// String menuStyle, String fulltype, +// String fullpoly, String searchWord,String publish_time, +// HttpServletRequest request) { +// if (StringUtils.isBlank(groupid)) groupid = ""; +// if (StringUtils.isBlank(projectid)) projectid = ""; +// if (StringUtils.isBlank(articleid)) articleid = ""; +// if (StringUtils.isBlank(relatedWord)) relatedWord = ""; +// if (StringUtils.isBlank(publish_time)) publish_time = ""; +// if (StringUtils.isBlank(menu)) menu = "full_search"; +// mv.addObject("menuStyle", menuStyle); +// mv.addObject("full_poly", fullpoly); +// mv.addObject("fulltype", fulltype); +// mv.addObject("searchWord", searchWord); +// mv.addObject("publish_time", publish_time); +// mv.addObject("articleid", articleid); +// mv.addObject("groupid", groupid); +// mv.addObject("projectid", projectid); +// mv.addObject("relatedword", relatedWord); +// mv.addObject("menu", "full_search"); +// mv.setViewName("search/search_detail"); +// return mv; +// } + + /** + * 获取一级菜单 + * + * @return + */ +// @GetMapping("listFullTypeByFirst") +// public @ResponseBody +// List listFullTypeByFirst() { +// List listFullTypeByFirst = fullSearchService.listFullTypeByFirst(); +// return listFullTypeByFirst; +// } + + /** + * 获取二级菜单 + * + * @param type_one_id + * @return + */ +// @GetMapping("listFullTypeBySecond") +// public @ResponseBody +// List listFullTypeBysecond(Integer type_one_id) { +// List listFullTypeBysecond = fullSearchService.listFullTypeBysecond(type_one_id); +// return listFullTypeBysecond; +// } + + /** + * 获取三级菜单 + * + * @param type_one_id + * @return + */ +// @GetMapping("listFullTypeByThird") +// public @ResponseBody +// List listFullTypeBythird(Integer type_two_id) { +// List listFullTypeBythird = fullSearchService.listFullTypeBythird(type_two_id); +// return listFullTypeBythird; +// } + + /** + * 获取聚合分类 + * + * @return + */ + @GetMapping("listFullPolymerization") + public @ResponseBody + List listFullPolymerization() { + return searchearchService.listFullPolymerization(); + } + +// /** +// * @return +// */ +// @GetMapping("getBreadCrumbs") +// public @ResponseBody +// JSONObject getBreadCrumbs(Integer menuStyle, Integer fulltype, Integer onlyid, Integer polyid) { +// return fullSearchService.getBreadCrumbs(menuStyle, fulltype, onlyid, polyid); +// } +// +// /** +// * 获取全文搜索一级分类列表 通过id list +// * +// * @param id +// * @return +// */ +// @GetMapping("listFullTypeOneByIdList") +// public @ResponseBody +// List listFullTypeOneByIdList(String id) { +// +// return fullSearchService.listFullTypeOneByIdList(list); +// } +// +// +// /** +// * @param [request] +// * @return com.alibaba.fastjson.JSONObject +// * @description: 获取用户输入的关键词
+// * @version: 1.0
+// * @date: 2020/7/13 14:05
+// * @author: huajiancheng
+// */ +// + @PostMapping(value = "/search") + @ResponseBody + public JSONObject getSearchWordById(HttpServletRequest request) { + JSONObject response = new JSONObject(); + JSONObject paramJson = new JSONObject(); + User user = userUtil.getuser(request); + String user_id = String.valueOf(user.getUser_id()); + paramJson.put("user_id", user_id); + response = fullSearchService.getSearchWordById(paramJson); + return response; + } + + + + + + + + @GetMapping(value = "/data") + @ResponseBody + public String getSpiderData(String keyword,String website_id,String pageNoData) { + + + long startJiebaTime = System.currentTimeMillis(); + String resultdata = ""; +// +// if(!"1".equals(website_id)) { + //Map map = templeteService.get(website_id); + + File file = new File(xmlPath+website_id+".txt"); + + String xml_data = TxtUtil.txt2String(file); + + //String data = WebSocketUtils.data(keyword,map.get("xml").toString(),pageNoData); + + String data = WebSocketUtils.data(keyword,xml_data,pageNoData); + + resultdata = dealdata(data); + +// +// }else { +// String source_url = "https://weixin.sogou.com/weixin?oq=&query="+keyword+"&_sug_type_=&sut=281&s_from=input&ri=0&_sug_=n&type=2&sst0=&page="+pageNoData+"&ie=utf8&w=&dr=1"; +// +// String html = PlaywrightUtil2.getHtml(source_url); +// +// +// +// Document parse = Jsoup.parse(html); +// +// Elements select = parse.select("#main > div.news-box > ul > li"); +// JSONArray jsonArray = new JSONArray(); +// for (int i = 0; i < select.size(); i++) { +// JSONObject jsonObject = new JSONObject(); +// +// Element element = select.get(i); +// String title = element.select("h3").get(0).text();//标题 +// +// String title_data = (title.indexOf(keyword)!=0)?(title.replaceAll(keyword,""+keyword+"")):(title); +// +// jsonObject.put("title", title_data); +// +// String abstract1 = element.select("#sogou_vr_11002601_summary_"+i).get(0).text();//摘要 +// +// +// +// String abstractdata = (abstract1.indexOf(keyword)!=0)?(abstract1.replaceAll(keyword,""+keyword+"")):(abstract1); +// jsonObject.put("abstract", abstractdata); +// +// +// +// +// +// String url = element.select("h3").get(0).attr("href");//原始链接 +// +// jsonObject.put("url", url); +// String publish_time = element.select("#sogou_vr_11002601_box_"+i+" > div.txt-box > div > span").get(0).text(); +// jsonObject.put("publish_time", publish_time); +// +// String source = "微信"; +// jsonObject.put("source", source); +// jsonArray.add(jsonObject); +// } +// resultdata = jsonArray.toJSONString(); +// } + + long time = (System.currentTimeMillis() - startJiebaTime);//毫秒值 + JSONObject jsonObject = new JSONObject(); + jsonObject.put("time", time); + jsonObject.put("data", resultdata); + + + return jsonObject.toJSONString(); + } + + + public String dealdata(String data) { + + JSONArray resultArray = new JSONArray(); + JSONArray parseArray = JSONArray.parseArray(data); + for (int i = 0; i < parseArray.size(); i++) { + JSONObject parseObject = JSONObject.parseObject(parseArray.get(i).toString()); + JSONObject parseObject2 = JSONObject.parseObject(parseObject.getString("message")); + + JSONArray parseArray2 = JSONArray.parseArray(parseObject2.getString("outputNames")); + + JSONArray valuesArray = JSONArray.parseArray(parseObject2.getString("values")); + + JSONObject jsonObject = new JSONObject(); + for (int j = 0; j < parseArray2.size(); j++) { + String string = parseArray2.get(j).toString(); + System.out.println("json数据:"+parseArray2); + System.out.println("json数据2:"+valuesArray); + String values = ""; + if(valuesArray.get(j)!=null) { + values = valuesArray.get(j).toString(); + } + jsonObject.put(string, values); + + } + resultArray.add(jsonObject); + } + + return resultArray.toJSONString(); + + } + + + + @GetMapping(value = "/index") + public ModelAndView getSpiderData(ModelAndView mv, + @RequestParam(value = "website_id", required = false, defaultValue = "3") String website_id, + @RequestParam(value = "stype", required = false, defaultValue = "1") String stype, + @RequestParam(value = "keyword", required = false, defaultValue = "疫情") String keyword, + @RequestParam(value = "pageNoData", required = false, defaultValue = "1") String pageNoData) { + mv.addObject("website_id", website_id); + mv.addObject("stype", stype); + mv.addObject("keyword", keyword); + mv.addObject("pageNoData", pageNoData); + + mv.setViewName("index"); + return mv; + } + + + @GetMapping(value = "/templete") + @ResponseBody + public List templete(String stype) { + List> list = searchearchService.getTemplete(stype); + return list; + } + + + + +} diff --git a/src/main/java/com/stonedt/intelligence/dao/TimelysearchDao.java b/src/main/java/com/stonedt/intelligence/dao/TimelysearchDao.java new file mode 100644 index 0000000..49a3b09 --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/dao/TimelysearchDao.java @@ -0,0 +1,18 @@ +package com.stonedt.intelligence.dao; + +import java.util.List; +import java.util.Map; + +import org.apache.ibatis.annotations.Mapper; + +import com.stonedt.intelligence.entity.TimelyPolymerization; + + +@Mapper +public interface TimelysearchDao { + + List listFullPolymerization(); + + List> getTemplete(String stype); + +} diff --git a/src/main/java/com/stonedt/intelligence/entity/TimelyPolymerization.java b/src/main/java/com/stonedt/intelligence/entity/TimelyPolymerization.java new file mode 100644 index 0000000..7ea80a6 --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/entity/TimelyPolymerization.java @@ -0,0 +1,93 @@ + +package com.stonedt.intelligence.entity; + +import java.io.Serializable; + +/** + * + * @author wangyi + * + */ + +public class TimelyPolymerization implements Serializable{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + private Integer id; + private String create_time; + private Integer type; + private String type_name; + private String value; + private String icon; + private Integer status; + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getCreate_time() { + return create_time; + } + public void setCreate_time(String create_time) { + this.create_time = create_time; + } + public Integer getType() { + return type; + } + public void setType(Integer type) { + this.type = type; + } + public String getType_name() { + return type_name; + } + public void setType_name(String type_name) { + this.type_name = type_name; + } + public String getValue() { + return value; + } + public void setValue(String value) { + this.value = value; + } + public String getIcon() { + return icon; + } + public void setIcon(String icon) { + this.icon = icon; + } + public Integer getStatus() { + return status; + } + public void setStatus(Integer status) { + this.status = status; + } + public static long getSerialversionuid() { + return serialVersionUID; + } + public TimelyPolymerization(Integer id, String create_time, Integer type, String type_name, String value, + String icon, Integer status) { + super(); + this.id = id; + this.create_time = create_time; + this.type = type; + this.type_name = type_name; + this.value = value; + this.icon = icon; + this.status = status; + } + public TimelyPolymerization() { + super(); + // TODO Auto-generated constructor stub + } + + + + + + + +} diff --git a/src/main/java/com/stonedt/intelligence/service/TimelysearchService.java b/src/main/java/com/stonedt/intelligence/service/TimelysearchService.java new file mode 100644 index 0000000..ad3d0b1 --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/service/TimelysearchService.java @@ -0,0 +1,15 @@ +package com.stonedt.intelligence.service; + +import java.util.List; +import java.util.Map; + +import com.stonedt.intelligence.entity.FullPolymerization; +import com.stonedt.intelligence.entity.TimelyPolymerization; + +public interface TimelysearchService { + + List listFullPolymerization(); + + List> getTemplete(String stype); + +} diff --git a/src/main/java/com/stonedt/intelligence/service/impl/TimelysearchServiceImpl.java b/src/main/java/com/stonedt/intelligence/service/impl/TimelysearchServiceImpl.java new file mode 100644 index 0000000..d343b19 --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/service/impl/TimelysearchServiceImpl.java @@ -0,0 +1,40 @@ +package com.stonedt.intelligence.service.impl; + +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.stonedt.intelligence.dao.TimelysearchDao; +import com.stonedt.intelligence.entity.TimelyPolymerization; +import com.stonedt.intelligence.service.TimelysearchService; + + + + + +@Service +public class TimelysearchServiceImpl implements TimelysearchService{ + + + + @Autowired + private TimelysearchDao timelysearchDao; + + @Override + public List listFullPolymerization() { + // TODO Auto-generated method stub + return timelysearchDao.listFullPolymerization(); + } + + @Override + public List> getTemplete(String stype) { + return timelysearchDao.getTemplete(stype); + } + + + + + +} diff --git a/src/main/java/com/stonedt/intelligence/util/TxtUtil.java b/src/main/java/com/stonedt/intelligence/util/TxtUtil.java new file mode 100644 index 0000000..8620f10 --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/util/TxtUtil.java @@ -0,0 +1,32 @@ +package com.stonedt.intelligence.util; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; + +public class TxtUtil { + /** + * 读取txt文件的内容 + * @param file 想要读取的文件对象 + * @return 返回文件内容 + */ + public static String txt2String(File file){ + StringBuilder result = new StringBuilder(); + try{ + BufferedReader br = new BufferedReader(new FileReader(file));//构造一个BufferedReader类来读取文件 + String s = null; + while((s = br.readLine())!=null){//使用readLine方法,一次读一行 + result.append(System.lineSeparator()+s); + } + br.close(); + }catch(Exception e){ + e.printStackTrace(); + } + return result.toString(); + } + + public static void main(String[] args){ + File file = new File("/Users/wangyi/Desktop/smart-api/1.txt"); + System.out.println(txt2String(file)); + } +} diff --git a/src/main/java/com/stonedt/intelligence/websocket/MyWebSocketClient.java b/src/main/java/com/stonedt/intelligence/websocket/MyWebSocketClient.java new file mode 100644 index 0000000..0bb533d --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/websocket/MyWebSocketClient.java @@ -0,0 +1,75 @@ +package com.stonedt.intelligence.websocket; + +import java.net.URI; +import org.java_websocket.client.WebSocketClient; +import org.java_websocket.handshake.ServerHandshake; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.alibaba.fastjson.JSONObject; + +/** + * websocket客户端监听类 + * @author 。 + */ +public class MyWebSocketClient extends WebSocketClient { + + private static Logger logger = LoggerFactory.getLogger(MyWebSocketClient.class); + + //用来接收数据 + private String excptMessage; + + + + + public MyWebSocketClient(URI serverUri) { + super(serverUri); + } + + @Override + public void onOpen(ServerHandshake serverHandshake) { + logger.info(">>>>>>>>>>>websocket open"); + } + + @Override + public void onMessage(String s) { + + this.excptMessage = s; + JSONObject parseObject = JSONObject.parseObject(s); + if(parseObject.getString("eventType").equals("output")) { + WebSocketUtils.array.add(parseObject); + } + + + + + + + + System.out.println("s:"+s); + + } + + @Override + public void onClose(int i, String s, boolean b) { + logger.info(">>>>>>>>>>>websocket close"); + } + + @Override + public void onError(Exception e) { + logger.error(">>>>>>>>>websocket error {}",e); + } + + + //获取接收到的信息 + public String getExcptMessage() { + if(excptMessage != null){ + String message = new String(excptMessage); + System.out.println("message:"+message); + excptMessage = null; + return message; + } + return null; + } + +} \ No newline at end of file diff --git a/src/main/java/com/stonedt/intelligence/websocket/WebSocketUtils.java b/src/main/java/com/stonedt/intelligence/websocket/WebSocketUtils.java new file mode 100644 index 0000000..8abd7db --- /dev/null +++ b/src/main/java/com/stonedt/intelligence/websocket/WebSocketUtils.java @@ -0,0 +1,80 @@ +package com.stonedt.intelligence.websocket; + +import java.net.URI; +import java.net.URISyntaxException; + +import org.java_websocket.WebSocket; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + +public class WebSocketUtils { + static JSONArray array = new JSONArray(); + + public static void main(String[] args) { + + String xml = ""; + + String data = data("疫情",xml,"1"); + System.out.println(data); + } + + public static String data(String keyword,String xml,String pageNoData){ + + long start = System.nanoTime(); + + array.clear(); + String message = null; + xml = xml.replaceAll("北京", keyword); + xml = xml.replaceAll("pageNoData", pageNoData); + System.out.println(xml); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("eventType", "test"); + jsonObject.put("message", xml); + + String data = jsonObject.toJSONString(); + + + try { + //实例WebSocketClient对象,并连接到WebSocket服务端 + MyWebSocketClient client = new MyWebSocketClient(new URI("ws://s1.stonedt.com:6388/ws")); + client.connect(); + //等待服务端响应 + while (!client.getReadyState().equals(WebSocket.READYSTATE.OPEN)) { + System.out.println("连接中···请稍后"); + Thread.sleep(1000); + } + //向WebSocket服务端发送数据 + client.send(data); + + + //等待WebSocket服务端响应 +// while((message = client.getExcptMessage())==null){ +// System.out.println("服务忙等待..."); +// Thread.sleep(1000); +// } + + while((message = client.getExcptMessage())==null||!JSONObject.parseObject(message).getString("eventType").equals("finish")){ + System.out.println("服务忙等待..."); + Thread.sleep(500); + } + + + + //打印服务端返回的数据 + System.out.println("成功获取数据:" + message); + //关闭连接 + client.close(); + // System.out.println(array); + } catch (URISyntaxException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + + + return array.toJSONString(); + } + +} diff --git a/src/main/resources/mapper/TimelysearchMapper.xml b/src/main/resources/mapper/TimelysearchMapper.xml new file mode 100644 index 0000000..baab9f1 --- /dev/null +++ b/src/main/resources/mapper/TimelysearchMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/dist/search_left.js b/src/main/resources/static/dist/search_left.js index 3928e71..1e493dd 100644 --- a/src/main/resources/static/dist/search_left.js +++ b/src/main/resources/static/dist/search_left.js @@ -1,9 +1,14 @@ //if(!full_type) full_type = 1 -if(menuStyle == 0){ - listFullPolymerization() -}else{ - listFullTypeByFirst() -} +// if(menuStyle == 0){ +// listFullPolymerization() +// }else{ +// listFullTypeByFirst() +// } + + +listFullPolymerization(); + + /** * 展开模式菜单 @@ -54,7 +59,7 @@ function listFullTypeByFirst(){ function listFullPolymerization(){ $.ajax({ type: 'GET', - url: ctx + 'fullsearch/listFullPolymerization', + url: ctx + 'timelysearch/listFullPolymerization', dataType: 'json', data: {}, contentType: 'application/json;charset=utf-8', @@ -69,11 +74,11 @@ function listFullPolymerization(){ if(full_poly == res[i].id){ aaa = 'sidebar-item comactive' idList = res[i].value - } - var htmlStr = '
  • ' + } + var htmlStr = '
  • ' + '' + ' ' - + ' ' + res[i].name + '' + + ' ' + res[i].type_name + '' + ' ' + '
  • ' $('#sidebarnav').append(htmlStr) diff --git a/src/main/resources/static/dist/timelysearch/monitorsearch.js b/src/main/resources/static/dist/timelysearch/monitorsearch.js new file mode 100644 index 0000000..d640c6e --- /dev/null +++ b/src/main/resources/static/dist/timelysearch/monitorsearch.js @@ -0,0 +1,542 @@ +//左侧菜单变化 +$('#sidebarnav li').each(function() { + if ($(this).data('id') == stype) { + $(this).siblings().removeClass("comactive") + $(this).addClass("comactive") + } +}); +//总页数 +let totalPage = 10; + +let currentPage = pageNoData; + +//updatepageHelper(currentPage, totalPage); + +gettempleteinfo(stype, website_id); + + + + + + + + +/** + * 获取模版信息 + */ +function gettempleteinfo(fulltype, website_id) { + debugger; + $.ajax({ + url: "/timelysearch/templete?stype=" + fulltype, + type: "get", + success: function(data) { + let resultdata = ''; + if (data.length > 0) { + for (let i = 0; i < data.length; i++) { + let strdata = ''; + + + if (website_id == 0 && i == 0) { + strdata = '' + data[i].engine + ''; + } else { + if (data[i].id == website_id) { + //strdata = ''+data[i].engine; + strdata = '' + data[i].engine + ''; + } else { + //strdata = ''+data[i].engine; + strdata = '' + data[i].engine + ''; + } + + + } + + + + + resultdata += strdata; + } + } + $("#engine").html(resultdata); + pageHelper(currentPage, totalPage); + ///updatepageHelper(currentPage, totalPage); + //var sexdata = $("input[name='sex']:checked").val(); + //搜索引擎 + var sexdata = ''; + $('span[data-engine]').each(function() { + if ($(this).hasClass('badge-info')) { + sexdata = $(this).data('engine'); + } + }); + var keywords = $("#searchWord").val(); + + //var pageNum = $("input[name='pageNum']:checked").val(); + + $('span[data-pagenum]').each(function() { + if ($(this).data('pagenum') == pageNoData) { + $(this).removeClass(normal); + $(this).removeClass(active); + $(this).addClass(active); + } else { + $(this).removeClass(normal); + $(this).removeClass(active); + $(this).addClass(normal); + } + + }); + + var pageNum = currentPage; + // $('#page li').each(function() { + // if ($(this).hasClass('active')) { + // pageNum = $(this).val(); + // } + // }); + + loadContent(fulltype,keywords,sexdata,pageNum); + + + + } + }); +} + + + + + + +//搜索引擎点击事件 +$(document).ready(function() { + + + $(document).on("click", "#engine span", function() { + var active = "badge-info"; + var normal = "badge-light"; + + var act = $(this).hasClass(active); + if (act) {} else { + $(this).siblings().removeClass(active); + $(this).siblings().addClass(normal); + $(this).removeClass(normal); + $(this).addClass(active); + } + + $('span[data-pagenum]').each(function() { + if ($(this).data('pagenum') == '1') { + $(this).removeClass(normal); + $(this).removeClass(active); + $(this).addClass(active); + } else { + $(this).removeClass(normal); + $(this).removeClass(active); + $(this).addClass(normal); + } + + }); + + + + pageHelper(1, totalPage); + var stype = ''; + $('#sidebarnav li').each(function() { + if ($(this).hasClass('comactive')) { + stype = $(this).data('id'); + } + }); + + + var sexdata = ''; + + + $('span[data-engine]').each(function() { + if ($(this).hasClass('badge-info')) { + sexdata = $(this).data('engine'); + } + }); + + var keywords = $("#searchWord").val(); + + loadContent(stype, keywords, sexdata, 1); + + }) +}); + + + + + + + + +function loadContent(stype, keywords, sexdata, pageNum) { + + $.ajax({ + url: "/timelysearch/data" + "?keyword=" + keywords + "&website_id=" + sexdata + "&pageNoData=" + + pageNum, + type: "get", + beforeSend: function() { + $("#contentdata").html(''); + debugger; + loading("#monitor-content"); + $('#div1').show(); + }, + success: function(data) { + $('#div1').hide(); + let jsondatadata = JSON.parse(data); + + $("#spider_time").html(jsondatadata.time + "ms"); + + + let resultresultdata = ''; + + let jsondata = JSON.parse(jsondatadata.data); + if (jsondata.length > 0) { + if (stype == "5") { + + resultresultdata = '
    '; + for (let i = 0; i < jsondata.length; i++) { + let imgdata = JSON.parse(jsondata[i].videojson); + strdata = '
    '; + + resultresultdata += strdata; + } + + resultresultdata += '
    '; + + } else if (stype == '4') { + + resultresultdata = '
    '; + for (let i = 0; i < jsondata.length; i++) { + let imgdata = JSON.parse(jsondata[i].videojson); + strdata = '
    '; + + resultresultdata += strdata; + } + + resultresultdata += '
    '; + } else { + for (let i = 0; i < jsondata.length; i++) { + let resultdata = jsondata[i]; + if (resultdata.videojson != null) { + let vediodata = resultdata.videojson; + console.info("i" + vediodata); + + + if (vediodata != '') { + + + + let imgjsondata = JSON.parse(vediodata); + if (imgjsondata != null && isEmptyObj(imgjsondata) == true) { + + if (imgjsondata.imglist.length > 0) { + + let imgurl = imgjsondata.imglist[0].imgurl; + if (imgurl != '') { + let strdata = '
    ' + + '
    ' + + resultdata.title + '' + + resultdata.publish_time + ' ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + + '
    ' + resultdata + .abstract + '
    ' + + '
    ' + + '
    ' + + '

    '; + + resultresultdata += strdata; + } else { + let strdata = '
    ' + + '
    ' + + '' + + jsondata[i].title + '' + + '' + jsondata[i].publish_time + + '
    ' + + '
    ' + jsondata[i] + .abstract + '
    ' + + '

    '; + + resultresultdata += strdata; + + + } + + + + + + } else { + + let strdata = '
    ' + + '
    ' + + '' + + jsondata[i].title + '' + + '' + jsondata[i].publish_time + + '
    ' + + '
    ' + jsondata[i] + .abstract + '
    ' + + '

    '; + + resultresultdata += strdata; + + + } + + + } else { + let strdata = '
    ' + + '
    ' + + '' + + jsondata[i].title + '' + + '' + jsondata[i].publish_time + + '
    ' + + '
    ' + jsondata[i].abstract + + '
    ' + + '

    '; + + resultresultdata += strdata; + } + + + } else { + let strdata = '
    ' + + '
    ' + + '' + + jsondata[i].title + '' + + '' + jsondata[i].publish_time + '
    ' + + '
    ' + jsondata[i].abstract + + '
    ' + + '

    '; + + resultresultdata += strdata; + + + } + + + + + + + + + + } else { + + let strdata = '
    ' + + '
    ' + + '' + + jsondata[i].title + '' + + '' + jsondata[i].publish_time + '
    ' + + '
    ' + jsondata[i].abstract + + '
    ' + + '

    '; + + resultresultdata += strdata; + + } + + + + + + } + } + } + $("#monitor-content").html(resultresultdata); + } + }); + let url = "result?website_id=" + sexdata + "&pageNoData=" + pageNum + "&keyword=" + keywords + "&stype=" + stype + + "&fulltype=" + stype; + console.info("11111111"+url); + setUrl(url); +} + + +/** + * 左侧菜单 点击 + * + * @param e + * @returns + */ +$('body').on( + 'click', + '#sidebarnav li', + function(e) { + if (!$(this).hasClass("comactive")) { + $(this).siblings().removeClass("comactive") + $(this).addClass("comactive") + //alert(); + + + var stype = $(this).attr("data-id"); + gettempleteinfo(stype, 0); + + + + + + pageHelper(1, totalPage); + var keywords = $("#searchWord").val(); + + var website_id = ''; + $('span[data-engine]').each(function() { + if ($(this).hasClass('badge-info')) { + website_id = $(this).data('engine'); + } + }); + debugger; + loadContent(stype, keywords, website_id, 1); + + let url = "result?website_id=" + website_id + "&pageNoData=1&keyword=" + keywords + + "&stype=" + stype + "&fulltype=" + stype; + console.info("22222222222"+url); + setUrl(url); + } + }) + + +//搜索框点击事件 + +$('body').on( + 'click', + '#searchBtn', + function(e) { + var keywords = $("#searchWord").val(); + + var website_id = ''; + $('span[data-engine]').each(function() { + if ($(this).hasClass('badge-info')) { + website_id = $(this).data('engine'); + } + }); + + + var stype = ''; + $('#sidebarnav li').each(function() { + if ($(this).hasClass('comactive')) { + stype = $(this).data('id'); + } + }); + + loadContent(stype, keywords, website_id, currentPage); + + pageHelper(1, totalPage); + + let url = "result?website_id=" + website_id + "&pageNoData=1&keyword=" + keywords + + "&stype=" + stype + "&fulltype=" + stype; + console.info("3333333"+url); + setUrl(url); + }) + + + + +function setUrl(url) { + history.pushState({ + url: url, + title: document.title + }, document.title, url) +} + + + +function isEmptyObj(obj) { + for (let item in obj) { + return true + } + return false +} + + + + +function pageHelper(currentPage, totalPages) { + $("#page").bootstrapPaginator({ + bootstrapMajorVersion: 3, //版本 + currentPage: currentPage, //当前页数 + numberOfPages: 10, //每次显示页数 + totalPages: totalPages, //总页数 + shouldShowPage: true, //是否显示该按钮 + useBootstrapTooltip: false, + onPageClicked: function (event, originalEvent, type, page) { + let keywords = $("#searchWord").val(); + + var website_id = ''; + $('span[data-engine]').each(function() { + if ($(this).hasClass('badge-info')) { + website_id = $(this).data('engine'); + } + }); + + + var stype = ''; + $('#sidebarnav li').each(function() { + if ($(this).hasClass('comactive')) { + stype = $(this).data('id'); + } + }); + loadContent(stype, keywords, website_id, page); + + + + // let url = "result?website_id=" + website_id + "&pageNoData=" + page + "&keyword=" + keywords + + // "&stype=" + stype + "&fulltype=" + stype; + // setUrl(url); + + } + + } + ); +} + + + +//更新分页参数 +// function updatepageHelper(currentPage, totalPages) { +// $("#page").bootstrapPaginator({ +// bootstrapMajorVersion: 3, //版本 +// currentPage: currentPage, //当前页数 +// numberOfPages: 10, //每次显示页数 +// totalPages: totalPages, //总页数 +// shouldShowPage: true, //是否显示该按钮 +// useBootstrapTooltip: false +// } +// ); +// } \ No newline at end of file diff --git a/src/main/resources/static/dist/timelysearch/search_result.js b/src/main/resources/static/dist/timelysearch/search_result.js new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/dist/timelysearch/search_result_data.js b/src/main/resources/static/dist/timelysearch/search_result_data.js new file mode 100644 index 0000000..7e1a13d --- /dev/null +++ b/src/main/resources/static/dist/timelysearch/search_result_data.js @@ -0,0 +1,2775 @@ +if (menuStyle == 0) { + listFullTypeOneByIdList() + $(".custom-box-info").css("padding", "20px 20px 0 20px") + $(".p-20").css("padding-top", "125px") + $("#search-tab").show() +} else { + $(".custom-box-info").css("padding", "25px") + $(".p-20").css("padding-top", "110px") + $("#search-tab").hide() +} + +// 聚合模式下 搜索框下面菜单 +function listFullTypeOneByIdList() { + var data = { + id : idList + } + console.log(idList) + ajax('GET', ctx + 'timelysearch/listFullTypeOneByIdList', data, + setFullTypeOne); +} + + + +/** + * 聚合模式下 li 菜单 + * + * @param e + * @returns + */ +$('body').on('click', '#search-tab li', function(e) { + // if (!$(this).hasClass("create-tab-act")) { + $(this).siblings().removeClass("create-tab-act") + $(this).addClass("create-tab-act") + full_type = $(this).attr("data-id") + onlyid = $(this).attr("data-onlyid") + initdata(full_type) + // } +}); + +/** + * ajax 同步 + * + * @param type + * @param url + * @param data + * @param funcname + * @returns + */ +function ajax(type, url, data, funcname) { + $.ajax({ + type : type, + url : url, + dataType : 'json', + data : data, + async : false, + contentType : 'application/json;charset=utf-8', + success : function(res) { + funcname(res); + }, + error : function(xhr, ajaxOptions, thrownError) { + if (xhr.status == 403) { + window.location.href = ctx + "login"; + } else { + $("#page").html(""); + dataerror("#monitor-content"); + } + } + }); +} + +/** + * 装载 一级分类 + * + * @param data + * @returns + */ +function setFullTypeOne(data) { + $('#search-tab').html('') + // if(!full_type){ + full_type = data[0].id + onlyid = data[0].only_id + // } + for (var i = 0; i < data.length; i++) { + var htmlStr = '' + if (full_type == data[i].id) { + htmlStr = '
  • ' + data[i].name + + '
  • ' + } else { + htmlStr = '
  • ' + data[i].name + '
  • ' + } + $('#search-tab').append(htmlStr) + } +} + +/** + * 数据来源数据装载 + * + * @param data + * @returns + */ +function setFirstBox(data) { + $('#classifybox').html("") + for (var i = 0; i < data.length; i++) { + var htmlStr = '' + + data[i].name + '' + if (i == 0) { + htmlStr = '' + + data[i].name + '' + } + $('#classifybox').append(htmlStr) + } +} + +/** + * 来源网站数据装载 + * + * @param data + * @returns + */ +function setThirdBox(data) { + $('#sourceName-select').html("") + var htmlStr = '' + $('#sourceName-select').append(htmlStr) + for (var i = 0; i < data.length; i++) { + if (full_type == 8) { + htmlStr = '' + } else { + htmlStr = '' + } + $('#sourceName-select').append(htmlStr) + } +} + +/** + * 搜索设置 + * + * @param params + * @returns + */ +function searchSetting(params) { + let styleStr = '' + if (menuStyle == 0) { + styleStr = '聚合模式' + + '展开模式' + } else { + styleStr = '聚合模式' + + '展开模式' + } + let pageSizeStr = ""; + if (pageSize == 25) { + pageSizeStr = '25' + + '50' + + '100' + } + if (pageSize == 50) { + pageSizeStr = '25' + + '50' + + '100' + } + if (pageSize == 100) { + pageSizeStr = '25' + + '50' + + '100' + } + + var create = '
    ' + + ' ' + + '
    ' + + $("body").append(create) + $("#closethis").click(function(param) { + $("#createmodel").remove() + }) + $("#cancel").click(function(param) { + $("#createmodel").remove() + }) + $("#confirm").click( + function() { + let params = "" + if (menuStyle == 0) { + params = "?" + "searchword=" + $('#searchWord').val() + + "&menuStyle=" + menuStyle + "&full_poly=" + + full_poly + "&fulltype=" + full_type + + "&pageSize=" + pageSize + "&page=1" + "&only_id=" + onlyid; + } else { + params = "?" + "searchword=" + $('#searchWord').val() + + "&menuStyle=" + menuStyle + "&fulltype=" + + full_type + "&pageSize=" + pageSize + "&page=1"; + } + window.location.href = ctx + 'fullsearch/result' + params; + }) +} + +/** + * contentType: 'application/json;charset=utf-8', + * + * @param param + * ajax请求基本参数 + * @param data + * 用户传的参数 + * @param funcname + * 方法名称 + * @description 请求列表数据 + */ + +function sendArticle(param, data, funcname) { + $("#page").html(""); + $.ajax({ + type : param.type, + url : param.url, + dataType : 'json', + data : data, + contentType : param.contentType, + beforeSend : function() { + loading("#monitor-content") + }, + success : function(res) { + funcname(res); + }, + error : function(xhr, ajaxOptions, thrownError) { + if (xhr.status == 403) { + window.location.href = ctxPath + "login"; + } else { + $("#page").html(""); + dataerror("#monitor-content"); + } + } + }); +} + +/** + * 组装律师数据 + * @param res + * @returns + */ +function installLawyer(res){ + if(res.code==="200"){ + let data=res.list + let totalCount=res.totalData + let totalPage=res.totalPage + let currentPage=res.currentPage + if (totalCount > 5000) { +// totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if(data.length>0){ + pageHelper(currentPage, totalPage); + $("#monitor-content").html(''); + for(let i=0;i'+ + '
    '+ + '
    '+ + '

    '+ + '
    '+ + '
    '+ + '

    '+ + ''+list1.name+'

    '+ + '

    '+ + '手机号: '+list1.telephone+''+ + '职位: '+list1.kinds+''+ + '擅长:'+list1.goods+' '+ + '学历: '+list1.educationbackground+''+ + + '

    '+ + '

    '+ + '邮件: '+list1.email+' '+ + '认证号:'+list1.certID+' '+ + '任职时间: '+list1.qualifitime.substring(0,10)+''+ + '

    '+ + '

    '+ + '律所名称: '+list1.lawfirm+''+ + '律所地址: '+list1.address+''+ + '城市:'+list1.city+' '+ + + '

    '+ + '
    '+ + '
    '+ + ''+ + ''+ + '
    ' + $('#monitor-content').append(html) + } + }else{ + $("#page").html(""); + $('#monitor-content').html('
    暂无数据!
    ') + } + }else{ + $("#page").html(""); + dataerror("#monitor-content"); + } +} + +/** + * 组装被执行人数据 + * @param res + * @returns + */ +function installExecutionPerson(res){ + if(res.code==="200"){ + let data=res.list + let totalCount=res.totalData + let totalPage=res.totalPage + let currentPage=res.currentPage + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if(data.length>0){ + pageHelper(currentPage, totalPage); + $("#monitor-content").html(''); + for(let i=0;i'+ + '
    '+ + '

    '+list1.iname+'

    '+ + '
    '+ + + '

    '+ + '做出执行单位: '+list1.gistUnit+''+ + '证件号: '+list1.cardNum+''+ + '类型: '+list1.type+''+ + '

    '+ + '

    '+ + '案件编号: '+list1.caseCode+''+ + '执行依据文号: '+list1.gistId+''+ + '最新区域: '+list1.areaNameNew+''+ + '法院名称: '+list1.courtName+''+ + '

    '+ + '

    职责: '+ list1.duty+'

    '+ + '

    '+ + '履行情况: '+list1.performance+''+ + '行为: '+list1.disruptTypeName+''+ + '

    '+ + '
    '+ + ' '+ + ''+ + '
    ' + $('#monitor-content').append(html) + } + }else{ + $("#page").html(""); + $('#monitor-content').html('
    暂无数据!
    ') + } + }else{ + $("#page").html(""); + dataerror("#monitor-content"); + } +} + +/** + * 组装专家人才数据 + */ +function installProfessor(res){ + if(res.code==="200"){ + let data=res.list + let totalCount=res.totalData + let totalPage=res.totalPage + let currentPage=res.currentPage + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if(data.length>0){ + pageHelper(currentPage, totalPage); + $("#monitor-content").html(''); + for(let i=0;i'+ + '
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '

    '+list1.title+'

    '+ + '
    '+ + // '

    '+content+'

    '+ + // '

    '+ + '

    '+ + '来源: '+list1.source_name+''+ + '研究机构: '+list1.institution+''+ + '研究领域: '+fields+''+ + '

    '+ + '

    '+ + '发表文章数量: '+list1.works+''+ + '被引频次: '+list1.times_cited+''+ + '

    '+ + '
    '+ + '
    '+ + '
    ' + $('#monitor-content').append(html) + } + }else{ + $("#page").html(""); + $('#monitor-content').html('
    暂无数据!
    ') + } + }else{ + $("#page").html(""); + dataerror("#monitor-content"); + } +} + +/** + * 组装医生数据 + */ +function installDoctor(res){ + if(res.code==="200"){ + let data=res.list + let totalCount=res.totalData + let totalPage=res.totalPage + let currentPage=res.currentPage + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if(data.length>0){ + pageHelper(currentPage, totalPage); + $("#monitor-content").html(''); + for(let i=0;i 100) { + adept = adept.substring(0, 100) + '......'; + } + var content = list1.content; + if (content && content.length > 100) { + content = content.substring(0, 100) + '......'; + } + let html = + "
    "+ + "
    "+ + "
    "+ + "
    "+ + "
    "+ + " "+ + "
    "+ + "
    "+ + "
    "+ + "
    "+ + "
    "+ + " " + list1.name + ""+ + "
    "+ + "
    " + + '
    '+ + '所属医院: '+list1.hospital+''+ + '所属科室: '+list1.department+''+ + '居住地: '+list1.province+' '+list1.city+' '+list1.area+''+ + '学位: '+list1.degree+''+ + '论文发表: '+list1.paper+''+ + '电话: '+list1.phone_number+''+ + '工作地址: '+list1.location+''+ + '
    '+ + '
    擅长: '+adept+'
    '+ + '
    简介: '+content+'
    '+ + "
    "+ + "
    "+ + "
    "+ + "
    "+ + "
    " + $('#monitor-content').append(html) + } + }else{ + $("#page").html(""); + $('#monitor-content').html('
    暂无数据!
    ') + } + }else{ + $("#page").html(""); + dataerror("#monitor-content"); + } +} + +/** + * 组装热点数据 + * + * @param res + * @returns + */ +function installHot(res) { + debugger; + let code = res.code; + if (code == 200) { + let data = res.data + let totalPage = res.page_count; + let totalCount = res.count; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + $("#monitor-content").html(''); + for (let i = 0; i < data.length; i++) { + let source = data[i]._source + let image_url = source.image_url + let imageUrlStr = '' + // if(image_url != null){ + // image_url = JSON.parse(image_url) + // image_url = image_url[0] + // imageUrlStr = '
    ' + // +'
    ' + // }else{ + // imageUrlStr = "" + // } + + var content = '' + let source_name = source.source_name + // 判断,不同来源,显示的值也不同 + if (source.content) { + content = source.content; + } + var publish_time = source.publish_time + if (!publish_time) { + publish_time = source.spider_time + } + + // 获取三个关键字,使用JSON.parse前,需要判断 + let keyWords = '' + if (source.key_words) { + var keys = JSON.parse(source.key_words); + var count = 0; + var key_word = []; + for ( var key in keys) { + key_word.push(key) + count++; + if (count == 3) { + break; + } + } + if (key_word.length == 0) { + key_word = "无"; + } else { + keyWords = ' 关键词 ' + + key_word + '' + } + } else { + key_word = "无"; + } + let strEmotion = ''; + if (source.sentiment == 1) { + strEmotion = '正面'; + } else if (source.sentiment == 2) { + strEmotion = '中性'; + } else if (source.sentiment == 3) { + strEmotion = '负面'; + } + + let sales_volume = '' + if (source.classify == 3) { + if (source.sales_volume) { + sales_volume = '销量:' + + source.sales_volume + '' + } + } + if (source.classify == 4 || source.classify == 2) { + if (source.original_weight) { + sales_volume = ' ' + + source.original_weight + '' + } + } + + let iconUrl = '' + if (source_name == '网易') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/163.com.png' + } else if (source_name == '36kr') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/36kr.com.png' + } else if (source_name == '好奇心研究所') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/qdaily.com.png' + } else if (source_name == '腾讯网') { + iconUrl = 'https://mat1.gtimg.com/www/icon/favicon2.ico' + } else if (source_name == '新浪') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/rank.sinanews.sina.cn.png' + } else if (source_name == '抖音') { + iconUrl = 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM5veqh0jlpkNK7iaVic8T1icPATdlKB1eVZLVjbxiaibPP3I5A/132' + } else if (source_name == '小红书') { + iconUrl = 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM6uD2n9QGUSN1PFY34un3ht0l9EBwfkrvkd3ov6paw1pg/132' + } else if (source_name == '京东') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/jd.com.png' + } else if (source_name == '淘宝') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/izhongchou.taobao.com.png' + } else if (source_name == '什么值得买') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/smzdm.com.png' + } else if (source_name == '微博') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/s.weibo.com.png' + } else if (source_name == '知乎') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/zhihu.com.png' + } else if (source_name == '百度风云榜') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/baidu.com.png' + } else if (source_name == '360热榜') { + iconUrl = 'https://s2.ssl.qhres.com/static/121a1737750aa53d.ico' + } else if (source_name == '搜狗热点') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/sogou.com.png' + } else if (source_name == '搜狗头图') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/sogou.com.png' + } else if (source_name == '百度') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/baidu.com.png' + } else if (source_name == '微信') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/mp.weixin.qq.com.png' + } else if (source_name == '网易') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/163.com.png' + } else if (source_name == '头条搜索') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/m.toutiao.com.png' + } else if (source_name == '今日头条') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/toutiao.com.png' + } else if (source_name == '豆瓣') { + iconUrl = 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM6pN8kDEzvUQxKRIzAkVdaxd5tRoEtyMztib8cbXFA76tA/132' + } else if (source_name == '哔哩哔哩') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/bilibili.com.png' + } else if (source_name == '爱奇艺') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/iqiyi.com.png' + } else if (source_name == '腾讯视频') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/v.qq.com.png' + } else if (source_name == '优酷视频') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/so.youku.com.png' + } else if (source_name == '拼多多') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/p.pinduoduo.com.png' + } else if (source_name == '澎湃新闻') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/thepaper.cn.png' + } else if (source_name == 'ZAKER') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/myzaker.com.png' + } else if (source_name == '中国政府网') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/gov.cn.png' + } else if (source_name == 'CCTV央视新闻') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/news.cctv.com.png' + } else if (source_name == '微信热词') { + iconUrl = 'https://file.ipadown.com/tophub/assets/images/media/weixin.sogou.com.png' + } + + let html = '
    ' + + '
    ' + + '
    ' + + '
    ' + + ' ' + + ' ' + + source.topic + + ' ' + + ' ' + + timeParse(publish_time) + + ' ' + + '
    ' + + '
    ' + + imageUrlStr + + '
    ' + + '
    ' + + content + + '
    ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + '
    ' + $("#monitor-content").append(html); + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } else { + $("#page").html(""); + dataerror("#monitor-content"); + } +} + +/** + * 组装投诉数据 + * + * @param res + * @returns + */ +function installComplaint(res) { + let code = res.code; + if (code == 200) { + let data = res.news + let totalPage = res.page_count + let totalCount = res.count + let currentPage = res.page + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + $("#monitor-content").html(''); + if (res.classify == 's') { + for (var i = 0; i < data.length; i++) { + var letter_content = data[i]._source.letter_content; + if (letter_content.length - 300 > 0) { + letter_content = letter_content.substring(0, 300) + + '......' + } + + var reply_content = data[i]._source.reply_content; + if (reply_content.length - 300 > 0) { + reply_content = reply_content.substring(0, 300) + + '......' + } + var writer = data[i]._source.writer; + if (writer == "") { + writer = '匿名'; + } + var reply = '
    ' + + '

    ' + + '' + + '' + + '' + + '[官方回答]:' + + data[i]._source.reply_source + '' + + '答复时间:' + + data[i]._source.reply_time + '' + '

    ' + + '

    ' + '' + + reply_content + '' + '

    ' + '
    '; + + var release_time = data[i]._source.release_time; + release_time = release_time.substr(0, 16); + var html = '
    ' + + '

    ' + + '' + + '' + + '' + + '' + + data[i]._source.title + + '' + + '

    ' + + '

    ' + + '来信人:' + + writer + + '' + + '来信时间:' + + release_time + + '' + + '来源:' + + data[i]._source.sourceName + + '' + + '

    ' + + '

    ' + + '' + + letter_content + + '' + + '

    ' + + '
    ' + + reply + '
    '; + + $('#monitor-content').append(html) + } + } else { + for (var i = 0; i < data.length; i++) { + var content = data[i]._source.content; + var answerHtml = ""; + if (data[i]._source.process != "") { + var imghtml = ""; + var answerArray = JSON.parse(data[i]._source.process); + for (var n = 0; n < answerArray.length; n++) { + var answer = answerArray[n]; + var answerContent = answer.content; + answerHtml = answerHtml + + '
    ' + + '' + + '' + + answer.uname + + '' + + '回复时间:' + + answer.date + + '' + + '
    回复内容:' + + answer.content + '
    ' + '
    ' + } + if (answerArray.length == 0) { + answerHtml = '
    暂无回复!
    ' + } + } + var s = ""; + if (i == 0) { + s = '
    ' + } else { + s = '
    ' + } + var str = /(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*)?)/gi; + var name = data[i]._source.uname + .replace(str, + ''); + var html = s + + '
    ' + + '发布者:' + + data[i]._source.uname + + '发布于:' + + data[i]._source.release_date + + '' + + '' + + '

    ' + + '内容:' + data[i]._source.detail + '

    ' + + '

    ' + '投诉对象:' + + data[i]._source.object + '' + + '投诉金额:' + + data[i]._source.money + '' + + '诉求类型:' + + data[i]._source.appeal + '' + '

    ' + + '
    ' + '
    ' + html += '
    ' + + answerHtml + + '
    ' + + '
    ' + + '状态:' + + data[i]._source.progress + + '' + + '来源:' + + data[i]._source.sourceName + '' + + '
    '; + $('#monitor-content').append(html) + } + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } else { + $("#page").html(""); + dataerror("#monitor-content"); + } +} + +/** + * 组装公告列表数据 + * + * @param res + * @returns + */ +function installAnnouncement(res) { + console.log(res); + let code = res.code; + if (code == 200) { + let data = res.list + let totalPage = res.totalPage + let totalCount = res.totalData + let currentPage = res.page + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + if(totalPage>1){ + pageHelper(currentPage, totalPage); + }else{ + $("#page").html(""); + } + let headHtml = '
    ' + + '
    ' + + '
    机构名称
    ' + + '
    标题
    ' + + '
    类型
    ' + + '
    报告时间
    ' + + '
    ' + + '
    ' + + '
    ' + $("#monitor-content").html(headHtml); + for (var i = 0; i < data.length; i++) { + let tdHtml = '
    ' + + '
    ' + + data[i].codename + + '
    ' + + ' ' + + '
    ' + + data[i].rtype + '
    ' + '
    ' + + data[i].reportDate.substring(0, 10) + '
    ' + + '
    ' + $('#tableData').append(tdHtml) + } + }else{ + $("#page").html(""); + nodata('#monitor-content'); + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } +} + +/** + * 组装研报列表数据 + * + * @param res + * @returns + */ +function installReport(res) { + console.log(res); + let code = res.code; + if (code == 200) { + let data = res.list + let totalPage = res.totalPage + let totalCount = res.totalData + let currentPage = res.page + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + console.log("totalPage: "+totalPage) + if(totalPage>1){ + pageHelper(currentPage, totalPage); + }else{ + $("#page").html(""); + } + let headHtml = '
    ' + + '
    ' + + '
    机构名称
    ' + + '
    股票代码
    ' + + '
    标题
    ' + // +'
    券商
    ' + // +'
    评级类型
    ' + + '
    日期
    ' + + '
    ' + + '
    ' + + '
    ' + $("#monitor-content").html(headHtml); + for (var i = 0; i < data.length; i++) { + var gucode = data[i].code; + gucode = gucode.split("."); + let reportDate = data[i].reportDate; + reportDate = /\d{4}-\d{1,2}-\d{1,2}/g.exec(reportDate); + var li = data[i].authorList; + var obj = eval(li); + var auth = ""; + for (var j = 0; j < obj.length; j++) { + var objs = eval(obj[j]); + auth += objs.auth + " "; + } + let tdHtml = '
    ' + + '
    ' + + data[i].codename + + '
    ' + + '
    ' + + gucode[0] + + '
    ' + + ' ' + // +'
    '+ + // data[i].org +'
    ' + // +'
    '+ + // data[i].rate +'
    ' + + '
    ' + + reportDate + '
    ' + '
    ' + $('#tableData').append(tdHtml) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + }else { + $("#page").html(""); + nodata('#monitor-content'); + } +} + +/** + * 组装招标列表数据 + * + * @param res + * @returns + */ +function installBidding(res) { + console.log(res); + let code = res.code; + if (code == 200) { + let data = res.list + let totalPage = res.totalPage + let totalCount = res.totalCount + let currentPage = res.page + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + let headHtml = '
    ' + + '
    ' + + '
    标题
    ' + + '
    省份
    ' + + '
    发布日期
    ' + + '
    数据来源
    ' + + '
    ' + + '
    ' + + '
    ' + $("#monitor-content").html(headHtml); + for (var i = 0; i < data.length; i++) { + let listDataObj = data[i]; + let province = listDataObj.province; + let datasource = listDataObj.datasource; + let publish_date = listDataObj.publish_time; + let title = listDataObj.title; + let article_public_id = listDataObj.article_public_id; + publish_date = /\d{4}-\d{1,2}-\d{1,2}/g.exec(publish_date); + if (province == "央企招投标") { + province = "中央"; + } + let tdHtml = '
    ' + + ' ' + + '
    ' + + province + + '
    ' + + '
    ' + + publish_date + + '
    ' + + '
    ' + + datasource + '
    ' + '
    ' + $('#tableData').append(tdHtml) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } +} + +/** + * 组装招聘列表数据 + * + * @param res + * @returns + */ +function installInvite(res) { + let code = res.code; + if (code == 200) { + let data = res.data; + let totalPage = res.totalPage; + let totalCount = res.totalCount; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + let headHtml = '
    ' + + '
    ' + + '
    职位
    ' + + '
    公司
    ' + + '
    地区
    ' + + '
    招聘人数
    ' + + '
    发布时间
    ' + + '
    ' + + '
    ' + + '
    ' + $("#monitor-content").html(headHtml); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + for (let i = 0; i < data.length; i++) { + let inviteObj = data[i]; + let job_type = inviteObj.job_type; + let invite_count = inviteObj.invite_count; + let invite_city = inviteObj.invite_city; + let push_time = inviteObj.push_time; + push_time = push_time.substring(0, 10); + let edu_level = inviteObj.edu_level; + let invite_title = inviteObj.invite_title; + let company_name = inviteObj.company_name; + let record_id = inviteObj.record_id; + + if (edu_level == 0) { + edu_level = "学历不限"; + } else if (edu_level == 1) { + edu_level = "初中及以下"; + } else if (edu_level == 2) { + edu_level = "初中"; + } else if (edu_level == 3) { + edu_level = "中专/中技/高中"; + } else if (edu_level == 4) { + edu_level = "大专"; + } else if (edu_level == 5) { + edu_level = "本科"; + } else if (edu_level == 6) { + edu_level = "硕士"; + } else if (edu_level == 7) { + edu_level = "博士"; + } else if (edu_level == 8) { + edu_level = "MBA/EMBA"; + } + + if (job_type == "0") { + job_type = "主营岗位" + } else { + job_type = "其他" + } + + let tdHtml = '
    ' + + ' ' + + '
    ' + + company_name + + '
    ' + + '
    ' + + invite_city + + '
    ' + + '
    ' + + invite_count + + '
    ' + + '
    ' + + push_time + '
    ' + '
    ' + $('#tableData').append(tdHtml) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } +} + +/** + * 组装 工商数据 + * + * @param res + * @returns + */ +function installCompany(res) { + let code = res.code; + if (code == 200) { + let data = res.list; + let totalPage = res.totalPage; + let totalCount = res.totalCount; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + let headHtml = '
    ' + + '
    ' + + '
    企业名称
    ' + + '
    省份
    ' + + '
    城市
    ' + + '
    所属行业
    ' + + '
    法定代办人
    ' + + '
    注册资本(万元)
    ' + + '
    成立日期
    ' + + '
    ' + + '
    ' + + '
    ' + $("#monitor-content").html(headHtml); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + for (let i = 0; i < data.length; i++) { + var legal_representative = data[i].legal_representative; + if (typeof legal_representative == "undefined") { + legal_representative = ""; + } + + let tdHtml = '
    ' + + ' ' + + '
    ' + + data[i].province + + '
    ' + + '
    ' + + data[i].city + + '
    ' + + '
    ' + + data[i].industry_involved + + '
    ' + + '
    ' + + legal_representative + + '
    ' + + '
    ' + // data[i].registered_capital.substring(0, 4) + + data[i].registered_capital + '
    ' + + '
    ' + + data[i].establish_time.substring(0, 10) + '
    ' + + '
    ' + $('#tableData').append(tdHtml) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } + +} +/** + * 组装 法律文书数据 + * + * @param res + * @returns + */ +function installJudgment(res) { + let code = res.code; + if (code == 200) { + let data = res.list; + let totalPage = res.totalPage; + let totalCount = res.totalCount; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + $('#monitor-content').html('') + pageHelper(currentPage, totalPage); + for (var i = 0; i < data.length; i++) { + var lawName = ''; + if (data[i].lawNameB == '') { + + lawName = data[i].lawNameA; + } else { + lawName = data[i].lawNameA + ',' + data[i].lawNameB; + } + + var lawFirm = ''; + if (data[i].lawNameB == '') { + lawFirm = data[i].lawFirmA; + } else { + lawFirm = data[i].lawFirmA + ',' + data[i].lawFirmB; + } + + var partyName = '';// 当事人 + var ob = data[i] + + var list_map = new Array(); + if(!(!ob.accuser)){ + var accuser = JSON.parse(ob.accuser); + list_map.push(accuser.name) + } + if(!(!ob.defendant)){ + var defendant = JSON.parse(ob.defendant); + + list_map.push(defendant.name) + } + if(!(!ob.participants)){ + var participants = JSON.parse(ob.participants); + list_map.push(participants.name) + } + if(!(!ob.extend_string_one)){ + var extend_string_one = JSON.parse(ob.extend_string_one); + for(var j=0 ;j 30){ + partyNameHtml = '法院:'+ob.caseCourt+'当事人: ' + + partyName.substring(0,30)+"..." + + '' + }else{ + partyNameHtml = '法院:'+ob.caseCourt+'当事人: ' + + partyName + + '' + } + + var judgment_htmlHtml = ''; + var judgment_html = '';//内容 + if(ob.judgment_html!=undefined){ + var delHtmlTaglist = delHtmlTag(ob.judgment_html) + + if(delHtmlTaglist.length > 210){ + //console.log(delHtmlTaglist) + //console.log(delHtmlTaglist.substring(0,210)+"...") + judgment_htmlHtml = '内容: ' + + delHtmlTaglist.substring(0,210)+"..." + + '' + }else{ + judgment_htmlHtml = '内容: ' + + delHtmlTaglist + + '' + } + } +// console.log(delHtmlTaglist.length) +// console.log(delHtmlTaglist.length > 210) + + + var refereeTime = '';//时间 + var refereeTimedate = deltime(ob.refereeTime) + + + var html = '
    ' + + '
    ' + + '' + + data[i].title + + '' + + '
    ' + + '

    ' + + + // '律师: + // '+lawName+''+ + partyNameHtml + + '仲裁时间: ' + + refereeTimedate + + '' + + + // '案件原因: + // '+data[i].caseCause+''+ + '

    ' + + + + // '

    '+ + // '发布时间: + // '+data[i].publishDate+''+ + // '律师事务所: + // '+lawFirm+''+ + // '法官: + // '+data[i].judgeName+''+ + // '案件类型: + // '+data[i].caseType+''+ + // '

    '+ + + '

    ' + + + /* + '内容: ' + + data[i].judgment_html + + '' + */ + judgment_htmlHtml + + '

    ' + + '
    ' + + '

    '; + $('#monitor-content').append(html) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } +} + +/** + * 组装 知识产权 列表数据 + * + * @param res + * @returns + */ +function installKnowLedge(res) { + let code = res.code; + if (code == 200) { + let data = res.list; + let totalPage = res.totalPage; + let totalCount = res.totalCount; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + $("#monitor-content").html(''); + for (let i = 0; i < data.length; i++) { + let obj = data[i]; + let openDay = obj.openDay; + let title = obj.title; + let type = obj.type; + let applyDay = obj.applyDay; + let applyMark = obj.applyMark; + let proposerZh = obj.proposerZh; + let proposerEn = obj.proposerEn; + let inventorZh = obj.inventorZh; + let openNumber = obj.openNumber; + let article_public_id = obj.article_public_id; + applyDay = /\d{4}-\d{1,2}-\d{1,2}/g.exec(applyDay); + openDay = /\d{4}-\d{1,2}-\d{1,2}/g.exec(openDay); + if (proposerZh == undefined || proposerZh == "") { + proposerZh = proposerEn; + } + + if (typeof inventorZh == "undefined") { + inventorZh = ""; + } + if (openNumber == undefined || openNumber == "") { + openNumber = "暂无数据"; + } + let detailUrl = ctx + 'fullsearch/knowLedgeDetail/' + + article_public_id + '?fulltype=' + full_type + + '&menuStyle=' + menuStyle + '&fullpoly=' + full_poly + + '&onlyid=' + onlyid + '&searchWord=' + + $('#searchWord').val() + + var conhtml = '
    ' + + '
    ' + + title + + '
    ' + + '

    ' + + '发明人: ' + + inventorZh + + '' + + '

    ' + + '

    ' + + '申请号: ' + + applyMark + + '' + + '

    ' + + '

    ' + + '公开日期: ' + + openDay + + '' + + '

    ' + + '
    ' + + '

    ' + + '类型: ' + + type + + '' + + '

    ' + + '

    ' + + '公开号: ' + + openNumber + + '' + + '

    ' + + '

    ' + + '申请日期: ' + + applyDay + + '' + + '

    ' + + '
    ' + + '

    摘要: ' + + (obj.abstractZh.length>150 ? obj.abstractZh.substring(0,150)+"..." : obj.abstractZh) + + '

    ' + + '
    ' + + '

    ' + $("#monitor-content").append(conhtml); + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } +} + +/** + * 组装 投资融资 数据 + * + * @param res + * @returns + */ +function installInvestment(res) { + let code = res.code; + if (code == 200) { + let data = res.list; + let totalPage = res.totalPage; + let totalCount = res.totalCount; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + let headHtml = '
    ' + + '
    ' + + '
    图标
    ' + + '
    受资方
    ' + + '
    轮次
    ' + + '
    金额
    ' + + '
    投资方
    ' + + '
    时间
    ' + + '
    ' + + '
    ' + + '
    ' + $("#monitor-content").html(headHtml); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + for (let i = 0; i < data.length; i++) { + var investorArray = JSON.parse(data[i].investorArray) + var investors = [] + if (investorArray.length > 0) { + investors.push(investorArray[0].investorName) + } else { + investors.push("--") + } + var push_time = data[i].push_time; + var push = /\d{4}-\d{1,2}-\d{1,2}/g.exec(push_time); + + let tdHtml = '
    ' + + '
    ' + + ' ' + + '
    ' + + data[i].rounds + + '
    ' + + '
    ' + + data[i].money + + '
    ' + + '
    ' + + investors + + '
    ' + + '
    ' + + push + '
    ' + '
    ' + $('#tableData').append(tdHtml) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } +} + +/** + * 组装 问答数据 列表 + * + * @param res + * @returns + */ +function installBaiduKnows(res) { + let code = res.code; + if (code == 200) { + let data = res.list; + let totalPage = res.totalPage; + let totalCount = res.totalCount; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + $('#monitor-content').html('') + for (let i = 0; i < data.length; i++) { + var answer = JSON.parse(data[i].answer_json); + var content = data[i].content; + if (content && content.length > 200) { + content = content.substring(0, 200) + '......' + } + var html2 = ''; + if (answer.length == 0) { + html2 = '
    ' + + '
    暂无回答
    ' + + '
    ' + } else { + for (var j = 0; j < answer.length; j++) { + var profile = answer[j].author_profile; + var answer_text = answer[j].answer; + if (!profile) { + profile = ctx + 'dist/img/doctor.jpg' + } + html2 += '
    ' + + '
    ' + + '
    ' + + '
    ' + + answer[j].author_name + + '
    ' + + '
    ' + + ' 等级:1' + + ' 粉丝:7' + + ' 获赞:' + + answer[j].agree_num + + '' + + ' 回答时间:' + + answer[j].answer_time + + '' + + '
    ' + + '
    ' + + '
    ' + + answer_text + + '
    ' + '
    ' + } + } + var html = '
    ' + + '
    提问:' + data[i].title + ' ' + + '
    ' + ' 悬赏:' + + data[i].reward + '' + ' 时间:' + + data[i].spider_time + '' + '
    ' + + '
    ' + '
    ' + + content + '
    ' + '

    '; + $('#monitor-content').append(html) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } +} + +/** + * 学术数据 + * + * @param res + * @returns + */ +function installThesisn(res) { + let code = res.code; + if (code == 200) { + let data = res.list; + let totalPage = res.totalPage; + let totalCount = res.totalCount; + let currentPage = res.page; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (data.length > 0) { + pageHelper(currentPage, totalPage); + $('#monitor-content').html('') + for (let i = 0; i < data.length; i++) { + var content = data[i].summary + if (content.length - 300 > 0) { + content = content.substring(0, 300) + '...' + } + var push_time = data[i].spider_time; + var push = push_time.substr(0, 16); + var authorName = JSON.parse(data[i].co_author); + var name = ""; + for (let j = 0; j < authorName.length; j++) { + name = authorName[j].name + "," + name; + } + name = name.substring(0, name.length - 1) + var html = '
    ' + + '
    ' + + '' + + data[i].title + + '' + + '
    ' + + '

    ' + + content + + '

    ' + + '

    ' + + '作者:' + + name + + '' + + '网站名:' + + data[i].source_name + + '' + + '发布时间:' + + push_time + + '' + + '

    ' + + '
    ' + + '

    ' + $('#monitor-content').append(html) + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } +} + +/** + * @description 组装资讯列表数据 + */ +function installArticle3(res) { + let code = res.code; + let strAll = ''; + if (code == 200) { + let data = res.data.data; + let totalPage = res.data.totalPage; + let totalCount = res.data.totalCount; + let currentPage = res.data.currentPage; + if (totalCount > 5000) { + totalCount = "5000+"; + totalPage = 5000 / pageSize; + } + $("#totalCount").html(totalCount); + if (res.data.hasOwnProperty("article_public_idList")) { + article_public_idList = res.data.article_public_idList; + } + if (data.length > 0) { + pageHelper(currentPage, totalPage); + for (let i = 0; i < data.length; i++) { + let dataJson = data[i]; + let classify = dataJson.classify; // 媒体分类 + // let classify = 2; + let websitelogo = dataJson.websitelogo; + let article_public_id = dataJson.article_public_id; + let author = dataJson.author; + let key_words = dataJson.key_words; + let sourcewebsitename = dataJson.sourcewebsitename; + let title = dataJson.title; + let content = dataJson.content; + let emotionalIndex = dataJson.emotionalIndex; + let publish_time = dataJson.publish_time; + let pub_data = dataJson.publish_time; + let extend_string_one = dataJson.extend_string_one; + let forwardingvolume = dataJson.forwardingvolume; // 转发量 + let commentsvolume = dataJson.commentsvolume; // 评论量 + let praisevolume = dataJson.praisevolume; // 点赞数 + let industrylable = dataJson.industrylable; + let eventlable = dataJson.eventlable; + let article_category = dataJson.article_category; + publish_time = timeParse(publish_time); + var relatedWord = dataJson.relatedWord; + let ner = dataJson.ner; + let num = 0 + let similarflag = 0; + let source_url = dataJson.source_url; + + //判断是否合并 + $('span[data-similar]').each(function () { + if ($(this).hasClass('badge-info')) { + similarflag = $(this).data('similar'); + } + }); + + if (similarflag == '1') { + debugger; + console.log("合并") + console.log(dataJson); + num = dataJson.num; + }else { + console.log("不合并"); + console.log(dataJson); + } + + + let copytext = ''; + if (classify == 2) { // 微博 + let strStart = '
    '; + let strCheck = '
    '; + let strContentStart = '
    '; + let strTitle = '
    ' + + title + + ''; + let category = dealCate(article_category); + + if (industrylable != '') { + strTitle += '' + industrylable + ' '; + } + + if (eventlable != '') { + strTitle += '' + eventlable + ' '; + } + + if (category != '') { + strTitle += '' + category + ' '; + } + + strTitle += '' + publish_time + '
    '; + + var str = "________________"; + /* 16 */ + let contentStart = ''; // 自己发的 + let contentEnd = ''; + if (content.indexOf(str) != -1) { + let index = content.lastIndexOf(str); + contentStart = content.substring(0, index); + contentEnd = content.substring(index + 16, + content.length); + } else { + contentStart = content; + } + + let strContent = '
    ' + + contentStart + '​
    '; // 自己的正文 + let strTranspond = '
    ' + + contentEnd + '
    '; // 转发的原文 + let strImgStart = '
    '; + let strImgGroup = ''; + if (typeof (extend_string_one) == "object") { + let imglist = extend_string_one.imglist; + if (imglist != null) { + for (let i = 0; i < imglist.length; i++) { + let imgurl = imglist[i].imgurl; + let imgurlstr = '
    ' + strImgGroup += imgurlstr; + if (i > 3) { + break; + } + } + } + } + let strImgEnd = '
    '; + let strLikeStr = ''; + let strContentEnd = '
    '; + let strEnd = '

    '; + strAll += strStart + strCheck + strContentStart + strTitle + + strContent + strTranspond + strImgStart + + strImgGroup + strImgEnd + strLikeStr + strSource + + strForward + strPraise + strComment + keyword + + strEmotion + strLikeEnd +strcompanyandgov+ strContentEnd + strEnd; + } else { + if (typeof (extend_string_one) == "object") { + let imglist = extend_string_one.imglist; + if (imglist.length > 0) { + let strStart = '
    '; + let strCheck = '
    '; + let strContentStart = '
    '; + let websitelogoStr = ''; + if (full_type == 38) { + websitelogoStr = ''; + } + let strTitle = '
    ' + + websitelogoStr + + title + + ''; + + + let category = dealCate(article_category); + + if (industrylable != '') { + strTitle += '' + industrylable + ' '; + } + + if (eventlable != '') { + strTitle += '' + eventlable + ' '; + } + + if (category != '') { + strTitle += '' + category + ' '; + } + + strTitle += '' + publish_time + '
    '; + + // let strTitle = '
    ' + title + '' + publish_time + '
    '; + let strContent = '
    ' + + content + '
    '; + let strLikeStrat = ''; + let strContentEnd = '
    '; + let strEnd = '

    '; + strAll += strStart + strCheck + strContentStart + + strTitle + strContent + strLikeStrat + + strSource + strKeywords +kuaijie+ strEmotion + + strLikeEnd + strcompanyandgov +strContentEnd + strEnd; + } else { + let strStart = '
    '; + let strCheck = '
    '; + let strContentStart = '
    '; + let websitelogoStr = ''; + if (full_type == 38) { + websitelogoStr = ''; + } + let strTitle = '
    ' + + websitelogoStr + + title + + ''; + // let strTitle = '
    ' + title + '' + publish_time + + // '
    '; + let category = dealCate(article_category); + + if (industrylable != '') { + strTitle += '' + industrylable + ' '; + } + + if (eventlable != '') { + strTitle += '' + eventlable + ' '; + } + + if (category != '') { + strTitle += '' + category + ' '; + } + + strTitle += '' + publish_time + '
    '; + + let strContent = '
    ' + + content + '
    '; + let strLikeStart = ''; + let strContentEnd = '
    '; + let strEnd = '

    '; + + let strcompanyandgov = ''; + + let kuaijie = '' + + '
    '; + + + strAll += strStart + strCheck + strContentStart + + strTitle + strContent + strLikeStart + + strSource + strKeywors +kuaijie+ strEmotion + + strLikeEnd +strcompanyandgov+ strContentEnd + strEnd; + } + } else { + let strStart = '
    '; + let strCheck = '
    '; + let strContentStart = '
    '; + let websitelogoStr = ''; + if (full_type == 38) { + websitelogoStr = ''; + } + let strTitle = '
    ' + + websitelogoStr + + title + + ''; + + let category = dealCate(article_category); + + if (industrylable != '') { + strTitle += '' + industrylable + ' '; + } + + if (eventlable != '') { + strTitle += '' + eventlable + ' '; + } + + if (category != '') { + strTitle += '' + category + ' '; + } + + strTitle += '' + publish_time + '
    '; + + // let strTitle = '
    ' + title + '' + // + publish_time + '
    '; + let strContent = '
    ' + + content + '
    '; + let strLikeStart = ''; + let strContentEnd = '
    '; + let strEnd = '

    '; + + let strcompanyandgov = ''; + + let kuaijie = '' + + '
    '; + + + strAll += strStart + strCheck + strContentStart + + strTitle + strContent + strLikeStart + + strSource + strKeywors +kuaijie+ strEmotion + + strLikeEnd+strcompanyandgov+strContentEnd + strEnd; + // console.log(strAll); + } + } + $("#monitor-content").html(strAll); + } + } else { + $("#page").html(""); + nodata('#monitor-content'); + } + } else { + $("#page").html(""); + dataerror("#monitor-content"); + } +} + +$('#date-range').datepicker({ + language : 'zh-CN', + format : "yyyy-mm-dd", + orientation : "bottom auto", + toggleActive : true, + keyboardNavigation : true, + enableOnReadonly : false, + todayHighlight : true, + endDate : getnow(), + autoclose : true, +}); + +function getnow() { + var now = new Date(); + var nowday = now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + + now.getDate(); + return nowday +} + +/** + * ajax 异步 + * + * @param type + * @param url + * @param data + * @param funcname + * @returns + */ +function ajaxAsync(type, url, data, funcname) { + $.ajax({ + type : type, + url : url, + dataType : 'json', + data : data, + async : true, + contentType : 'application/json;charset=utf-8', + beforeSend : function() { + loading("#monitor-content") + }, + success : function(res) { + funcname(res); + }, + error : function(xhr, ajaxOptions, thrownError) { + if (xhr.status == 403) { + window.location.href = ctx + "login"; + } else { + $("#page").html(""); + dataerror("#monitor-content"); + } + } + }); +} + +/** + * list去重 + * @returns + */ + +function deduplication(arr){ +// = this, + var i, + obj = {}, + result = [], + len = arr.length; + for(i = 0; i< arr.length; i++){ + if(!obj[arr[i]]){ //如果能查找到,证明数组元素重复了 + obj[arr[i]] = 1; + result.push(arr[i]); + } + } + return result; + }; + + /** + * html去除标签 + * @returns + */ + + function delHtmlTag(str){ + var result = str.replace(/<[^>]+>/g,""); + result = result.replace(/>/g,""); + result = result.replace(/ - +