Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
5894dfdc11
|
|
@ -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<String> 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<String> 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) {
|
||||
|
|
|
|||
|
|
@ -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<Class> classes = new ArrayList<>();
|
||||
LinkedHashMap<String, List<Filter>> filters = new LinkedHashMap<>();
|
||||
Document doc = Jsoup.parse(OkHttp.string(url));
|
||||
List<String> 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, "");
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
796038950e2224240f96e3ab74f0af96
|
||||
9cc15b83a755468e6b725667ef362a04
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue