Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
0ea66baf4f
|
|
@ -1,5 +1,6 @@
|
|||
package com.github.catvod.bean;
|
||||
|
||||
import com.github.catvod.utils.Util;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
|
@ -10,6 +11,7 @@ import org.json.JSONObject;
|
|||
import java.lang.reflect.Type;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -135,6 +137,13 @@ public class Result {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Result chrome() {
|
||||
Map<String, String> header = new HashMap<>();
|
||||
header.put("User-Agent", Util.CHROME);
|
||||
header(header);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result parse() {
|
||||
this.parse = 1;
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -37,8 +37,9 @@ public class Push extends Spider {
|
|||
|
||||
@Override
|
||||
public String playerContent(String flag, String id, List<String> vipFlags) {
|
||||
if (id.startsWith("http") && id.contains("***")) id = id.replace("***", "#");
|
||||
if (flag.equals("直連")) return Result.get().url(id).subs(getSubs(id)).string();
|
||||
if (flag.equals("嗅探")) return Result.get().parse().url(id).string();
|
||||
if (flag.equals("嗅探")) return Result.get().parse().url(id).chrome().string();
|
||||
if (flag.equals("解析")) return Result.get().parse().jx().url(id).string();
|
||||
return ali.playerContent(flag, id, vipFlags);
|
||||
}
|
||||
|
|
@ -48,6 +49,7 @@ public class Push extends Spider {
|
|||
vod.setVodId(url);
|
||||
vod.setTypeName("FongMi");
|
||||
vod.setVodName(url.startsWith("file://") ? new File(url).getName() : url);
|
||||
if (url.startsWith("http") && url.contains("#")) url = url.replace("#", "***");
|
||||
vod.setVodPic("https://pic.rmb.bdstatic.com/bjh/1d0b02d0f57f0a42201f92caba5107ed.jpeg");
|
||||
vod.setVodPlayFrom(TextUtils.join("$$$", Arrays.asList("直連", "嗅探", "解析")));
|
||||
vod.setVodPlayUrl(TextUtils.join("$$$", Arrays.asList("播放$" + url, "播放$" + url, "播放$" + url)));
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
db8ee47ff1095679871f083b2f5bf388
|
||||
96a99e445d620353890869d95755b890
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;db8ee47ff1095679871f083b2f5bf388",
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;96a99e445d620353890869d95755b890",
|
||||
"wallpaper": "https://gao.chuqiuyu.workers.dev",
|
||||
"sites": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;db8ee47ff1095679871f083b2f5bf388",
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;96a99e445d620353890869d95755b890",
|
||||
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
||||
"sites": [
|
||||
{
|
||||
|
|
@ -500,12 +500,21 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "點擊",
|
||||
"name": "夜市",
|
||||
"hosts": [
|
||||
"yeslivetv.com"
|
||||
],
|
||||
"script": [
|
||||
"document.getElementsByClassName(\"vjs-big-play-button\")[0].click()"
|
||||
"document.getElementsByClassName('vjs-big-play-button')[0].click()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "毛驢",
|
||||
"hosts": [
|
||||
"www.maolvys.com"
|
||||
],
|
||||
"script": [
|
||||
"document.getElementsByClassName('swal-button swal-button--confirm')[0].click()"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue