Commit ad9bd7b0 by chenweitao

调整脉脉采集文本长度设定

parent 78f6edb4
...@@ -39,7 +39,7 @@ public class MaiMaiHotSearchCrawler { ...@@ -39,7 +39,7 @@ public class MaiMaiHotSearchCrawler {
log.error("脉脉热榜页面连接异常...", e); log.error("脉脉热榜页面连接异常...", e);
} }
//1024 - 26(时间戳+type) = 998 -> name.getBytes(StandardCharsets.UTF_8).length<998 -> 998/3 = 332 //1024 - 26(时间戳+type) = 998 -> name.getBytes(StandardCharsets.UTF_8).length<998 -> 998/3 = 332
int nameLengthMax = 332; int nameLengthMax = 300;
if (StringUtils.isNotBlank(htmlBody) && htmlBody.contains("feeds")) { if (StringUtils.isNotBlank(htmlBody) && htmlBody.contains("feeds")) {
JSONArray jsonArray = JSONObject.parseObject(htmlBody).getJSONArray("feeds"); JSONArray jsonArray = JSONObject.parseObject(htmlBody).getJSONArray("feeds");
if (jsonArray != null) { if (jsonArray != null) {
......
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