Commit 9fe36b3b by goul

fix:修改数据爬取范围 添加爬取测试接口

parent 8e5fb8c2
......@@ -55,6 +55,8 @@ public class CrawlData {
data1.put("high_counrt_city_name", "宁波");
data1.put("counrt_name", "慈溪");
data1.put("case_no", "民");
data1.put("odayDate1", CrawlDataXs.threeMonth());
data1.put("odayDate2", CrawlDataXs.nowDate());
crawlPage(URL_ALL,data1,1);
}
......@@ -73,9 +75,10 @@ public class CrawlData {
//总页数
int counts = Integer.parseInt(el.attr("value"))+1;
List<Map<String,Object>> list_map = business.excuteSql(" SELECT MAX(PAGE+0) AS PAGE FROM t_award_file WHERE FLAG = 1 AND TYPE = 1 AND PAGE IS NOT NULL ");
int counta = Integer.parseInt(list_map.get(0).get("PAGE").toString());
for(int i = counts;i>=counta;i--){
System.out.print("爬取的民事数据:"+el.getAllElements());
System.out.print("爬取的民事数据总页数:"+counts);
for(int i = 0;i<=counts;i++){
String str = DateTools.getServerDateTime(10).split(" ")[1];
str = str.substring(0,5);
if(PropUtil.getValue("DATA_TIME1", "quartz_service", "0").equals(str)){
......
......@@ -77,9 +77,8 @@ public class CrawlDataXs {
//总页数
int counts = Integer.parseInt(el.attr("value"))+1;
//List<Map<String,Object>> list_map = business.excuteSql(" SELECT MAX(PAGE+0) AS PAGE FROM t_award_file WHERE FLAG = 2 AND TYPE = 1 AND PAGE IS NOT NULL ");
//int counta = Integer.parseInt(list_map.get(0).get("PAGE").toString());
//for(int i = counts;i>=counta;i--){
System.out.print("爬取的刑事数据:"+el.getAllElements());
System.out.print("爬取的刑事数据总页数:"+counts);
for(int i = 0;i<counts;i++){
String str = DateTools.getServerDateTime(10).split(" ")[1];
......
......@@ -27,6 +27,8 @@ import com.gaowj.util.ServiceUtil;
import com.gaowj.util.StringUtil;
import com.gaowj.util.getDDConfig;
import com.jf.businessInfo.DataMBusiness;
import com.jf.common.CrawlData;
import com.jf.common.CrawlDataXs;
import com.jf.common.GetWord;
import net.sf.json.JSONObject;
......@@ -366,8 +368,21 @@ public class AjaxLoginAction extends BasicAction {
}
public String test() throws Exception {
GetWord.matcherRuleLable("11", "C:\\Users\\VULCAN\\Desktop\\慈溪市检察院\\裁决书\\xs3.doc", "刑初","金a11罪" ,"2", "2");
//CrawlData.crawlData();
Thread t1 = new Thread(){
@Override
public void run() {
CrawlData.crawlData();
}
};
t1.start();
Thread t2 = new Thread(){
@Override
public void run() {
CrawlDataXs.crawlData_xs();
}
};
t2.start();
return "json";
}
......@@ -380,7 +395,7 @@ public class AjaxLoginAction extends BasicAction {
//获取word内容
public String test2() throws Exception {
GetWord.getWordContent(2);
GetWord.getWordContent(1);
return "json";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment