diff --git a/app/src/main/java/com/github/catvod/spider/Local.java b/app/src/main/java/com/github/catvod/spider/Local.java index c8cb7574..4875bcc8 100644 --- a/app/src/main/java/com/github/catvod/spider/Local.java +++ b/app/src/main/java/com/github/catvod/spider/Local.java @@ -1,6 +1,7 @@ package com.github.catvod.spider; import android.content.Context; +import android.net.Uri; import android.os.Environment; import com.github.catvod.bean.Class; @@ -63,20 +64,34 @@ public class Local extends Spider { @Override public String detailContent(List ids) { - File file = new File(ids.get(0)); - Vod vod = new Vod(); - vod.setTypeName("FongMi"); - vod.setVodId(file.getAbsolutePath()); - vod.setVodName(file.getName()); - vod.setVodPic(Image.VIDEO); - vod.setVodPlayFrom("播放"); - vod.setVodPlayUrl(file.getName() + "$" + file.getAbsolutePath()); - return Result.string(vod); + String url = ids.get(0); + if (url.startsWith("http")) { + String name = Uri.parse(url).getLastPathSegment(); + return Result.string(create(name, url)); + } else { + File file = new File(ids.get(0)); + return Result.string(create(file.getName(), file.getAbsolutePath())); + } } @Override public String playerContent(String flag, String id, List vipFlags) throws Exception { - return Result.get().url("file://" + id).subs(getSubs(id)).string(); + if (id.startsWith("http")) { + return Result.get().url(id).string(); + } else { + return Result.get().url("file://" + id).subs(getSubs(id)).string(); + } + } + + private Vod create(String name, String url) { + Vod vod = new Vod(); + vod.setTypeName("FongMi"); + vod.setVodId(url); + vod.setVodName(name); + vod.setVodPic(Image.VIDEO); + vod.setVodPlayFrom("播放"); + vod.setVodPlayUrl(name + "$" + url); + return vod; } private Vod create(File file) { 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 4f3e5232..734ac16e 100644 --- a/app/src/main/java/com/github/catvod/spider/Miss.java +++ b/app/src/main/java/com/github/catvod/spider/Miss.java @@ -21,7 +21,7 @@ import java.util.List; public class Miss extends Spider { - private final String url = "https://missav.com/cn/"; + private final String url = "https://missav.com/"; @Override public String homeContent(boolean filter) throws Exception { @@ -29,12 +29,12 @@ public class Miss extends Spider { List classes = new ArrayList<>(); LinkedHashMap> filters = new LinkedHashMap<>(); Document doc = Jsoup.parse(OkHttp.string(url)); - List typeIds = Arrays.asList("chinese-subtitle", "new", "release", "uncensored-leak", "genres/VR", "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", "furuke"); - for (Element a : doc.select("nav a")) { + for (Element a : doc.select("a.block.px-4.py-2.text-sm.leading-5.text-nord5.bg-nord3")) { String typeId = a.attr("href").replace(url, ""); - if (!typeIds.contains(typeId)) continue; - classes.add(new Class(typeId, a.text())); - filters.put(typeId, Arrays.asList(new Filter("filters", "過濾", Arrays.asList(new Filter.Value("全部", ""), new Filter.Value("單人作品", "individual"), new Filter.Value("中文字幕", "chinese-subtitle"))))); + if (typeId.startsWith("dm") || typeId.contains("VR")) { + classes.add(new Class(typeId, a.text())); + filters.put(typeId, Arrays.asList(new Filter("filters", "過濾", Arrays.asList(new Filter.Value("全部", ""), new Filter.Value("單人作品", "individual"), new Filter.Value("中文字幕", "chinese-subtitle"))))); + } } for (Element div : doc.select("div.thumbnail")) { String id = div.select("a.text-secondary").attr("href").replace(url, ""); diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 1bf58e21..a413a815 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 9afb42ff..62cffd9e 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -796038950e2224240f96e3ab74f0af96 +9cc15b83a755468e6b725667ef362a04 diff --git a/json/adult.json b/json/adult.json index 18383dc7..c0057ae8 100644 --- a/json/adult.json +++ b/json/adult.json @@ -1,5 +1,5 @@ { - "spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;796038950e2224240f96e3ab74f0af96", + "spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;9cc15b83a755468e6b725667ef362a04", "wallpaper": "https://gao.chuqiuyu.tk", "sites": [ { @@ -100,7 +100,7 @@ "searchable": 1, "style": { "type": "rect", - "ratio": 1.777 + "ratio": 1.78 } }, { diff --git a/json/config.json b/json/config.json index cf9dd0fa..801691bb 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,5 @@ { - "spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;796038950e2224240f96e3ab74f0af96", + "spider": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;9cc15b83a755468e6b725667ef362a04", "wallpaper": "http://饭太硬.top/深色壁纸/api.php", "sites": [ {