diff --git a/app/src/main/java/com/github/catvod/spider/Bili.java b/app/src/main/java/com/github/catvod/spider/Bili.java index e21af019..0e2113bf 100644 --- a/app/src/main/java/com/github/catvod/spider/Bili.java +++ b/app/src/main/java/com/github/catvod/spider/Bili.java @@ -12,6 +12,7 @@ import com.github.catvod.utils.Misc; import com.github.catvod.utils.Trans; import org.json.JSONArray; +import org.json.JSONException; import org.json.JSONObject; import org.jsoup.Jsoup; @@ -29,9 +30,15 @@ public class Bili extends Spider { private HashMap header; private JSONObject ext; - private void initHeader() { + private String getCookie(String cookie) { + if (TextUtils.isEmpty(cookie)) return "buvid3=84B0395D-C9F2-C490-E92E-A09AB48FE26E71636infoc"; + if (cookie.startsWith("http")) return OkHttpUtil.string(cookie); + return cookie; + } + + private void initHeader(JSONObject ext) throws JSONException { header = new HashMap<>(); - header.put("cookie", "_uuid=5D5B10137-1328-6FA7-F1078-7299610109934F45334infoc; bg_view_12044=386583; buvid3=185689C8-03A5-751C-1AAF-03F69282AA9E47110infoc; b_nut=1667308447; buvid4=1AB69C99-50B4-D973-BF32-2CB8367580C147110-122110121-JleLtcqrjFz2MFF2u1deMQ%3D%3D; buvid_fp_plain=undefined; fingerprint3=dd53d137790289498f103b2fbf3fb252; fingerprint=7cc2faedec7082808a3099d0e3188c38; DedeUserID=429617357; DedeUserID__ckMd5=58f591cbe4b64558; SESSDATA=b70d8210%2C1682860530%2C600cd*b1; bili_jct=30fa4e1fd12981b4ae980d7ad5252894; i-wanna-go-back=-1; b_ut=5; buvid_fp=18ca78cc62eef7ce8dba4a806e9fdfa6; bg_view_41410=691613%7C478176; bg_view_43141=690880; sid=5tu2zjlx; b_lsid=10515334D_184366495CB; theme_style=light; nostalgia_conf=-1; innersign=1; rpdid=|(J|k~|)lk~k0J'uYY~JY|)|Y; CURRENT_FNVAL=16; CURRENT_QUALITY=120"); + header.put("cookie", getCookie(ext.getString("cookie"))); header.put("User-Agent", Misc.CHROME); header.put("Referer", url); } @@ -41,7 +48,7 @@ public class Bili extends Spider { try { if (extend.startsWith("http")) extend = OkHttpUtil.string(extend); ext = new JSONObject(extend); - initHeader(); + initHeader(ext); } catch (Exception e) { e.printStackTrace(); } diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index da2b8583..ca5eab31 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index b01919e8..22e34472 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -cb28e75e52c19b1f09d8e2bc0bd090a0 +96f5781d0a913ce798c67b5e7c8873b0 diff --git a/json/adult.json b/json/adult.json index e9756e5b..d684fc4d 100644 --- a/json/adult.json +++ b/json/adult.json @@ -1,5 +1,5 @@ { - "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;cb28e75e52c19b1f09d8e2bc0bd090a0", + "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;96f5781d0a913ce798c67b5e7c8873b0", "wallpaper": "https://gao.chuqiuyu.tk", "lives": [ { diff --git a/json/bili.json b/json/bili.json index 7f783ed1..0e65befb 100644 --- a/json/bili.json +++ b/json/bili.json @@ -1,4 +1,5 @@ { + "cookie": "_uuid=5E4B2B98-1014A-84D8-FA33-EC210C5BEC10DA82367infoc; buvid3=E9D0A426-85E9-E6C7-C75E-206A3E1BEB4D81910infoc; b_nut=1666168082; buvid4=4FC87B9C-3540-2275-688C-8612D3EA719B81910-022101916-ZLe640jXRAMHySuaCe9aUw==; rpdid=|(k|u)YYm)uY0J'uYYYuY)uuu; i-wanna-go-back=-1; fingerprint=9c214a6da0197a48e576ccf22e9f0ac7; buvid_fp_plain=undefined; nostalgia_conf=-1; DedeUserID=3493076028885079; DedeUserID__ckMd5=60a8757a1f4d6ae9; buvid_fp=9c214a6da0197a48e576ccf22e9f0ac7; CURRENT_QUALITY=80; b_ut=5; CURRENT_FNVAL=4048; PVID=2; bp_video_offset_3493076028885079=undefined; SESSDATA=a8f3eeec,1683060208,52956*b2; bili_jct=46b9b1895ab6ba9bb0c8027af30be16b; sid=7wckic0c; innersign=0; b_lsid=AD245D4A_1844214179E", "classes": [ { "type_name": "帕梅拉", diff --git a/json/config.json b/json/config.json index 339a7bb2..5ee499a2 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,5 @@ { - "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;cb28e75e52c19b1f09d8e2bc0bd090a0", + "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;96f5781d0a913ce798c67b5e7c8873b0", "wallpaper": "http://www.kf666888.cn/api/tvbox/img", "lives": [ {