Commit 71e6eb7e by chenweitao

Merge branch 'working' into 'master'

知乎热搜标签采集程序更新

See merge request !234
parents 6e9bd74c 2f6f9a6f
......@@ -189,7 +189,7 @@ public class ZhihuHotSearchCrawler {
//获取标签
String label = "";
Elements select = document.select("div.QuestionHeader-topics").select("div.css-1gomreu");
String substring = htmlBody.substring(htmlBody.indexOf("initialState") - 2, htmlBody.indexOf("subAppName") + 19);
String substring = htmlBody.substring(htmlBody.indexOf("initialState") - 2, htmlBody.indexOf("spanName") + 25);
JSONObject jsonObject = JSONObject.parseObject(substring);
String detail= jsonObject.getJSONObject("initialState").getJSONObject("entities").getJSONObject("questions").getJSONObject(id).getString("detail");
String topicLead = DelTagsUtil.getTextFromHtml(detail);
......
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