Clean code

This commit is contained in:
FongMi 2023-10-16 16:38:08 +08:00
parent ed4a27651b
commit 44eb250566
3 changed files with 13 additions and 17 deletions

View File

@ -59,10 +59,7 @@ public class Jianpian extends Spider {
@Override @Override
public String categoryContent(String tid, String pg, boolean filter, HashMap<String, String> extend) throws Exception { public String categoryContent(String tid, String pg, boolean filter, HashMap<String, String> extend) throws Exception {
if (tid.endsWith("/{pg}")) { if (tid.endsWith("/{pg}")) return searchContent(tid.split("/")[0], pg);
String[] splits = tid.split("/");
return searchContent(splits[0], pg);
} else {
List<Vod> list = new ArrayList<>(); List<Vod> list = new ArrayList<>();
HashMap<String, String> ext = new HashMap<>(); HashMap<String, String> ext = new HashMap<>();
if (extend != null && extend.size() > 0) ext.putAll(extend); if (extend != null && extend.size() > 0) ext.putAll(extend);
@ -75,7 +72,6 @@ public class Jianpian extends Spider {
for (Data data : resp.getData()) list.add(data.vod()); for (Data data : resp.getData()) list.add(data.vod());
return Result.string(list); return Result.string(list);
} }
}
@Override @Override
public String detailContent(List<String> ids) throws Exception { public String detailContent(List<String> ids) throws Exception {

Binary file not shown.

View File

@ -1 +1 @@
440a3457a41af7c5800d6b5c7e8ef350 f4bb4cabaaac07b29a5b1a705a76ce33