Clean code

This commit is contained in:
FongMi 2023-08-10 01:16:06 +08:00
parent 67aec79d99
commit d21d2fb88b
5 changed files with 10 additions and 14 deletions

View File

@ -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.

View File

@ -1 +1 @@
1763b7d2459b598d1ccb6a10b0e81b73
edae7af0ef2089cfc135c90ce085aacd

View File

@ -1,5 +1,5 @@
{
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;1763b7d2459b598d1ccb6a10b0e81b73",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;edae7af0ef2089cfc135c90ce085aacd",
"wallpaper": "https://gao.chuqiuyu.tk",
"sites": [
{

View File

@ -1,5 +1,5 @@
{
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;1763b7d2459b598d1ccb6a10b0e81b73",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;edae7af0ef2089cfc135c90ce085aacd",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [
{