Commit 3be7dcdd by leiliangliang

增加知乎标签异常捕获

parent 63e222b6
...@@ -164,6 +164,7 @@ public class ZhihuHotSearchCrawler { ...@@ -164,6 +164,7 @@ public class ZhihuHotSearchCrawler {
Map<String,String> Map = HeaderTool.getCommonHead(); Map<String,String> Map = HeaderTool.getCommonHead();
Map.put("cookie", "_xsrf=7NFWM5qBcOutfs8MaW7bhQQH65t3Xia4"); Map.put("cookie", "_xsrf=7NFWM5qBcOutfs8MaW7bhQQH65t3Xia4");
Request request = RequestUtils.wrapGet(url,Map); Request request = RequestUtils.wrapGet(url,Map);
try {
Response response = httpBoot.syncCall(request, ProxySupplier.NAT_HEAVY_PROXY); Response response = httpBoot.syncCall(request, ProxySupplier.NAT_HEAVY_PROXY);
if (response.hasCause()){ if (response.hasCause()){
Throwable cause = response.cause(); Throwable cause = response.cause();
...@@ -192,6 +193,9 @@ public class ZhihuHotSearchCrawler { ...@@ -192,6 +193,9 @@ public class ZhihuHotSearchCrawler {
return doc; return doc;
} }
} }
} catch (Exception e) {
log.info("知乎热搜标签解析异常",e);
}
return doc;
} }
} }
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