This commit is contained in:
parent
45b8d811e6
commit
cc2abbcbbb
|
|
@ -25,6 +25,7 @@ import java.util.List;
|
|||
public class Bili01 extends Spider {
|
||||
private String extend;
|
||||
private static final String url = "https://www.bilibili.com";
|
||||
private static final String recmUrl = "https://api.bilibili.com/x/web-interface/wbi/index/top/feed/rcmd?y_num=3&fresh_type=4&feed_version=V8&fresh_idx_1h=9&fetch_row=28&fresh_idx=9&brush=9&homepage_ver=1&ps=12&outside_trigger=&w_rid=a7d90770ead893ccfef77d9ae4438cae&wts=1675154158";
|
||||
protected JSONObject ext = null;
|
||||
private HashMap<String, String> header;
|
||||
|
||||
|
|
@ -146,6 +147,10 @@ public class Bili01 extends Spider {
|
|||
}
|
||||
}
|
||||
url += "&page=" + pg;
|
||||
//获取个人推荐
|
||||
if (tid.equals("recm")) {
|
||||
url = recmUrl;
|
||||
}
|
||||
SpiderDebug.log("bili>>categoryContent:" + url);
|
||||
SpiderDebug.log("bili>>categoryContent>>header:" + header);
|
||||
String content = OkHttpUtil.string(url, header);
|
||||
|
|
@ -158,7 +163,7 @@ public class Bili01 extends Spider {
|
|||
// JSONArray RSArray = resp.getJSONObject("data").getJSONArray("result");
|
||||
|
||||
JSONArray list = new JSONArray();
|
||||
JSONArray RSArray = data.getJSONArray("result");
|
||||
JSONArray RSArray = data.getJSONArray(tid.equals("recm") ? "item" : "result");
|
||||
for (int i = 0; i < RSArray.length(); i++) {
|
||||
JSONObject info = RSArray.getJSONObject(i);
|
||||
JSONObject result = new JSONObject();
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
7f368a17c6be2abd31d89abc0b407f4c
|
||||
d97f0dbc2d2d83c3f22d89095f88dbfe
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://raw.iqiq.io/dukunjueji/CatVodSpider/main/jar/custom_spider.jar;md5;7f368a17c6be2abd31d89abc0b407f4c",
|
||||
"spider": "https://raw.iqiq.io/dukunjueji/CatVodSpider/main/jar/custom_spider.jar;md5;d97f0dbc2d2d83c3f22d89095f88dbfe",
|
||||
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
||||
"lives": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
"type_name": "自驾游",
|
||||
"type_id": "自驾游"
|
||||
},
|
||||
{
|
||||
"type_name": "推荐",
|
||||
"type_id": "recm"
|
||||
},
|
||||
{
|
||||
"type_name": "美食",
|
||||
"type_id": "美食"
|
||||
|
|
|
|||
Loading…
Reference in New Issue