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