Commit a0976a4d by leiliangliang

更新微博娱乐榜采集程序

parent 844f58b8
...@@ -56,7 +56,16 @@ public class WeiboEntertainmentCrawler { ...@@ -56,7 +56,16 @@ public class WeiboEntertainmentCrawler {
for (int j = 0; j < cardGroup.size(); j++) { for (int j = 0; j < cardGroup.size(); j++) {
JSONObject cardInfo = cardGroup.getJSONObject(j); JSONObject cardInfo = cardGroup.getJSONObject(j);
String name = cardInfo.getString("desc"); String name = cardInfo.getString("desc");
long hotCount = cardInfo.getLongValue("desc_extr"); String desc_extr = cardInfo.getString("desc_extr");
Long hotCount = null;
if (Objects.nonNull(desc_extr)) {
String[] split = desc_extr.split(" ");
if (split.length > 1) {
hotCount = Long.valueOf(split[0].trim());
} else {
hotCount = cardInfo.getLongValue("desc_extr");
}
}
String iconUrl = cardInfo.getString("icon"); String iconUrl = cardInfo.getString("icon");
String icon =null; String icon =null;
if (StringUtils.isNotBlank(iconUrl)) { if (StringUtils.isNotBlank(iconUrl)) {
......
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