|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.tzld.piaoquan.longarticle.common.constants.CrawlerConstant;
|
|
|
import com.tzld.piaoquan.longarticle.model.po.longarticle.CrawlerVideo;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
@@ -14,6 +15,7 @@ import java.security.MessageDigest;
|
|
|
import java.security.NoSuchAlgorithmException;
|
|
|
import java.util.*;
|
|
|
|
|
|
+@Slf4j
|
|
|
public class HkspSearch {
|
|
|
|
|
|
|
|
@@ -47,7 +49,7 @@ public class HkspSearch {
|
|
|
);
|
|
|
List<String> sensitiveWords = new ArrayList<>();
|
|
|
List<JSONObject> list = hkspSearch("法律纠纷,教育投资,家庭责任", sensitiveWords, "");
|
|
|
- for (JSONObject jsonObject : list){
|
|
|
+ for (JSONObject jsonObject : list) {
|
|
|
CrawlerVideo crawlerVideo = baiduVideoProduce(jsonObject);
|
|
|
System.out.println(jsonObject);
|
|
|
System.out.println(crawlerVideo);
|
|
@@ -127,8 +129,9 @@ public class HkspSearch {
|
|
|
}
|
|
|
return sb.toString();
|
|
|
} catch (NoSuchAlgorithmException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
+ log.error("HkspSearch md5 error", e);
|
|
|
}
|
|
|
+ return "";
|
|
|
}
|
|
|
|
|
|
private static boolean sensitiveFlag(List<String> sensitiveWords, String title) {
|