Clean code
This commit is contained in:
parent
5cf47666bd
commit
574d6b7132
|
|
@ -122,17 +122,13 @@ public class Bili extends Spider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String homeVideoContent() throws Exception {
|
||||
if (extend.has("json")) {
|
||||
String api = "https://api.bilibili.com/x/web-interface/popular?ps=20";
|
||||
String json = OkHttp.string(api, getGuest());
|
||||
Resp resp = Resp.objectFrom(json);
|
||||
List<Vod> list = new ArrayList<>();
|
||||
for (Resp.Result item : Resp.Result.arrayFrom(resp.getData().getList())) list.add(item.getVod());
|
||||
return Result.string(list);
|
||||
}
|
||||
String[] types = extend.get("type").getAsString().split("#");
|
||||
return categoryContent(types[0], "1", true, new HashMap<>());
|
||||
public String homeVideoContent() {
|
||||
String api = "https://api.bilibili.com/x/web-interface/popular?ps=20";
|
||||
String json = OkHttp.string(api, getGuest());
|
||||
Resp resp = Resp.objectFrom(json);
|
||||
List<Vod> list = new ArrayList<>();
|
||||
for (Resp.Result item : Resp.Result.arrayFrom(resp.getData().getList())) list.add(item.getVod());
|
||||
return Result.string(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
1763b7d2459b598d1ccb6a10b0e81b73
|
||||
edae7af0ef2089cfc135c90ce085aacd
|
||||
|
|
|
|||
Loading…
Reference in New Issue