|
|
|
|
@ -148,17 +148,18 @@ public class Bili extends Spider { |
|
|
|
|
public String detailContent(List<String> ids) throws Exception { |
|
|
|
|
if (!login) checkLogin(); |
|
|
|
|
|
|
|
|
|
String id = ids.get(0); |
|
|
|
|
String api = "https://api.bilibili.com/x/web-interface/archive/stat?bvid=" + id; |
|
|
|
|
String json = OkHttp.string(api, getMember()); |
|
|
|
|
Resp resp = Resp.objectFrom(json); |
|
|
|
|
String aid = resp.getData().getAid(); |
|
|
|
|
String[] split = ids.get(0).split("@"); |
|
|
|
|
// String api = "https://api.bilibili.com/x/web-interface/archive/stat?bvid=" + id;
|
|
|
|
|
// String json = OkHttp.string(api, getMember());
|
|
|
|
|
// Resp resp = Resp.objectFrom(json);
|
|
|
|
|
String id = split[0]; |
|
|
|
|
String aid = split[1]; |
|
|
|
|
|
|
|
|
|
api = "https://api.bilibili.com/x/web-interface/view?aid=" + aid; |
|
|
|
|
json = OkHttp.string(api, getMember()); |
|
|
|
|
Data detail = Resp.objectFrom(json).getData(); |
|
|
|
|
Vod vod = new Vod(); |
|
|
|
|
vod.setVodId(id); |
|
|
|
|
vod.setVodId(ids.get(0)); |
|
|
|
|
vod.setVodPic(detail.getPic()); |
|
|
|
|
vod.setVodName(detail.getTitle()); |
|
|
|
|
vod.setTypeName(detail.getType()); |
|
|
|
|
@ -344,4 +345,4 @@ public class Bili extends Spider { |
|
|
|
|
} catch (Exception ignored) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|