浏览代码

修改自动删评论代码

syh 5 年之前
父节点
当前提交
e011b9a6fb

+ 4 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

@@ -955,11 +955,14 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
             params.put("pcursorMap", pcursorMap);
             params.put("count", 30);
             String str = HttpUtils2.httpPostRequest("https://b.e.kuaishou.com/rest/business/commentInfo/photos", params, headers);
-            log.info("评论数据获取:{}" + str);
             ObjectMapper mapper = new ObjectMapper();
             mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
             JsonNode node = mapper.readTree(str);
             Integer result = node.get("result").asInt();
+            JsonNode pcursoNode = node.get("pcursor");
+            if (null == pcursoNode) {
+                log.info("异常数据:{}", str);
+            }
             String pcursor = node.get("pcursor").asText();
             if (result == 1) {
                 Iterator<JsonNode> nodes = node.get("photos").iterator();