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