Fix init error bug

This commit is contained in:
FongMi 2022-11-15 13:57:56 +08:00
parent 7060c045c4
commit 3cc711e2f5
5 changed files with 9 additions and 4 deletions

View File

@ -42,9 +42,14 @@ public class Bili extends Spider {
header.put("Referer", url); header.put("Referer", url);
} }
private void fetchExt() {
String result = OkHttpUtil.string(extend);
if (!TextUtils.isEmpty(result)) extend = result;
}
private void fetchRule() throws Exception { private void fetchRule() throws Exception {
if (header.containsKey("cookie") && header.get("cookie").length() > 0) return; if (header.containsKey("cookie") && header.get("cookie").length() > 0) return;
if (extend.startsWith("http")) extend = OkHttpUtil.string(extend); if (extend.startsWith("http")) fetchExt();
ext = new JSONObject(extend); ext = new JSONObject(extend);
setHeader(); setHeader();
} }

Binary file not shown.

View File

@ -1 +1 @@
2d2edf4641fcba0a6f315a29cdbbef51 940f5635d30de6ef9025c334afaf706b

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;2d2edf4641fcba0a6f315a29cdbbef51", "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;940f5635d30de6ef9025c334afaf706b",
"wallpaper": "https://gao.chuqiuyu.tk", "wallpaper": "https://gao.chuqiuyu.tk",
"lives": [ "lives": [
{ {

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;2d2edf4641fcba0a6f315a29cdbbef51", "spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;940f5635d30de6ef9025c334afaf706b",
"wallpaper": "http://www.kf666888.cn/api/tvbox/img", "wallpaper": "http://www.kf666888.cn/api/tvbox/img",
"lives": [ "lives": [
{ {