diff --git a/app/src/main/java/com/github/catvod/api/AliYun.java b/app/src/main/java/com/github/catvod/api/AliYun.java index c0664bef..2aa68103 100644 --- a/app/src/main/java/com/github/catvod/api/AliYun.java +++ b/app/src/main/java/com/github/catvod/api/AliYun.java @@ -153,7 +153,8 @@ public class AliYun { url = url.startsWith("https") ? url : "https://api.aliyundrive.com/" + url; OkResult result = OkHttp.postJson(url, json, getHeaderAuth()); SpiderDebug.log(result.getCode() + "," + url + "," + result.getBody()); - if (retry && (result.getCode() == 400 || result.getCode() == 401) && refreshAccessToken()) return auth(url, json, false); + if (retry && result.getCode() == 400 && refreshShareToken()) return auth(url, json, false); + if (retry && result.getCode() == 401 && refreshAccessToken()) return auth(url, json, false); if (retry && result.getCode() == 429) return auth(url, json, false); return result.getBody(); } @@ -178,7 +179,7 @@ public class AliYun { return false; } - private void refreshShareToken() { + private boolean refreshShareToken() { SpiderDebug.log("refreshShareToken..."); JsonObject param = new JsonObject(); param.addProperty("share_id", shareId); @@ -186,6 +187,7 @@ public class AliYun { String json = post("v2/share_link/get_share_token", param); shareToken = Share.objectFrom(json).getShareToken(); if (shareToken.isEmpty()) Utils.notify("來晚啦,該分享已失效。"); + return shareToken.length() > 0; } private boolean refreshAccessToken() { diff --git a/app/src/main/java/com/github/catvod/spider/Miss.java b/app/src/main/java/com/github/catvod/spider/Miss.java index 6a139066..8185abd3 100644 --- a/app/src/main/java/com/github/catvod/spider/Miss.java +++ b/app/src/main/java/com/github/catvod/spider/Miss.java @@ -28,12 +28,12 @@ public class Miss extends Spider { List list = new ArrayList<>(); List classes = new ArrayList<>(); LinkedHashMap> filters = new LinkedHashMap<>(); - List typeIds = Arrays.asList("chinese-subtitle", "new", "release", "uncensored-leak", "today-hot", "weekly-hot", "monthly-hot", "siro", "luxu", "gana", "maan", "scute", "ara", "uncensored-leak", "fc2", "heyzo", "tokyohot", "1pondo", "caribbeancom", "caribbeancompr", "10musume", "pacopacomama", "gachinco", "xxxav", "marriedslash", "naughty4610", "naughty0930", "madou", "twav"); Document doc = Jsoup.parse(OkHttp.string(url)); - for (Element a : doc.select("nav").select("a")) { + for (Element a : doc.select("nav a")) { String typeName = a.text(); + if (!a.attr("href").startsWith("http")) continue; String typeId = a.attr("href").replace(url, ""); - if (!typeIds.contains(typeId)) continue; + if (typeId.startsWith("http")) continue; classes.add(new Class(typeId, typeName)); filters.put(typeId, Arrays.asList(new Filter("filters", "過濾", Arrays.asList(new Filter.Value("全部", ""), new Filter.Value("單人作品", "individual"), new Filter.Value("中文字幕", "chinese-subtitle"))))); } diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index e55093ea..fdea0397 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 8782773f..905d0cc4 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -a2204506315000174d11fe509f88259c +22b3579498649b93fdfa3aab84792568 diff --git a/json/adult.json b/json/adult.json index 0cee2c78..ee325104 100644 --- a/json/adult.json +++ b/json/adult.json @@ -1,5 +1,5 @@ { - "spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a2204506315000174d11fe509f88259c", + "spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;22b3579498649b93fdfa3aab84792568", "wallpaper": "https://gao.chuqiuyu.tk", "sites": [ { diff --git a/json/config.json b/json/config.json index b416a368..1b7cb0a7 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,5 @@ { - "spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;a2204506315000174d11fe509f88259c", + "spider": "https://fongmi.cachefly.net/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;22b3579498649b93fdfa3aab84792568", "wallpaper": "http://饭太硬.top/深色壁纸/api.php", "sites": [ {