Commit dd5abcf0 by chenweitao

Merge branch 'working' into 'master'

增加知乎标签异常捕获

See merge request !189
parents 3f14dd0a 3be7dcdd
......@@ -164,6 +164,7 @@ public class ZhihuHotSearchCrawler {
Map<String,String> Map = HeaderTool.getCommonHead();
Map.put("cookie", "_xsrf=7NFWM5qBcOutfs8MaW7bhQQH65t3Xia4");
Request request = RequestUtils.wrapGet(url,Map);
try {
Response response = httpBoot.syncCall(request, ProxySupplier.NAT_HEAVY_PROXY);
if (response.hasCause()){
Throwable cause = response.cause();
......@@ -192,6 +193,9 @@ public class ZhihuHotSearchCrawler {
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