Update
This commit is contained in:
parent
6041fc8374
commit
42b4aadfea
|
|
@ -26,6 +26,8 @@ public class Result {
|
|||
private String header;
|
||||
@SerializedName("format")
|
||||
private String format;
|
||||
@SerializedName("danmaku")
|
||||
private String danmaku;
|
||||
@SerializedName("url")
|
||||
private Object url;
|
||||
@SerializedName("subs")
|
||||
|
|
@ -148,6 +150,11 @@ public class Result {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Result danmaku(String danmaku) {
|
||||
this.danmaku = danmaku;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result format(String format) {
|
||||
this.format = format;
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public class Bili extends Spider {
|
|||
if (!login && !ask) checkLogin();
|
||||
|
||||
String[] split = ids.get(0).split("@");
|
||||
String id = split[0];
|
||||
String bvid = split[0];
|
||||
String aid = split[1];
|
||||
|
||||
String api = "https://api.bilibili.com/x/web-interface/view?aid=" + aid;
|
||||
|
|
@ -169,7 +169,7 @@ public class Bili extends Spider {
|
|||
flag.put("B站", TextUtils.join("#", episode));
|
||||
|
||||
episode = new ArrayList<>();
|
||||
api = "https://api.bilibili.com/x/web-interface/archive/related?bvid=" + id;
|
||||
api = "https://api.bilibili.com/x/web-interface/archive/related?bvid=" + bvid;
|
||||
JSONArray array = new JSONObject(OkHttp.string(api, getMember())).optJSONArray("data");
|
||||
for (int i = 0; i < array.length(); i++) {
|
||||
JSONObject object = array.getJSONObject(i);
|
||||
|
|
@ -212,8 +212,9 @@ public class Bili extends Spider {
|
|||
if (empty) findVideo(dash, video, dash.getVideo().get(0).getId());
|
||||
|
||||
String mpd = getMpd(dash, video.toString(), audio.toString());
|
||||
String dan = "https://api.bilibili.com/x/v1/dm/list.so?oid=".concat(cid);
|
||||
String url = "data:application/dash+xml;base64," + Base64.encodeToString(mpd.getBytes(), 0);
|
||||
return Result.get().url(url).dash().header(getMember()).string();
|
||||
return Result.get().url(url).danmaku(dan).dash().header(getMember()).string();
|
||||
}
|
||||
|
||||
private void findAudio(Dash dash, StringBuilder sb) {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
37e03cb1531bf4b163bf0b366bc9aa6c
|
||||
d5a5fbed39e0451e8f201f8bf53f276c
|
||||
|
|
|
|||
Loading…
Reference in New Issue