Clean code

This commit is contained in:
唐三 2023-08-11 19:47:33 +08:00
parent fb9aa8b6a2
commit 7824a110f4
5 changed files with 4 additions and 3 deletions

View File

@ -135,6 +135,7 @@ public class Bili extends Spider {
public String categoryContent(String tid, String pg, boolean filter, HashMap<String, String> extend) throws Exception {
String order = extend.containsKey("order") ? extend.get("order") : "totalrank";
String duration = extend.containsKey("duration") ? extend.get("duration") : "0";
tid = extend.containsKey("tid") ? extend.get("tid") : tid;
String api = "https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword=" + URLEncoder.encode(tid) + "&order=" + order + "&duration=" + duration + "&page=" + pg;
String json = OkHttp.string(api, getGuest());
Resp resp = Resp.objectFrom(json);

Binary file not shown.

View File

@ -1 +1 @@
edae7af0ef2089cfc135c90ce085aacd
6634431a04b488e0984e752918316382

View File

@ -1,5 +1,5 @@
{
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;edae7af0ef2089cfc135c90ce085aacd",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;6634431a04b488e0984e752918316382",
"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;edae7af0ef2089cfc135c90ce085aacd",
"spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;6634431a04b488e0984e752918316382",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [
{