add - 详情页播放66
This commit is contained in:
@@ -35,11 +35,9 @@ public class PushAgent extends Spider {
|
|||||||
private static final Map<String, Map<String, String>> dizz = new HashMap();
|
private static final Map<String, Map<String, String>> dizz = new HashMap();
|
||||||
private static final ReentrantLock ReentrantLock = new ReentrantLock();
|
private static final ReentrantLock ReentrantLock = new ReentrantLock();
|
||||||
private static final long n = 0;
|
private static final long n = 0;
|
||||||
public static Integer type=1;
|
|
||||||
private static final String SiteUrl = "https://api.aliyundrive.com";
|
private static final String SiteUrl = "https://api.aliyundrive.com";
|
||||||
private static final Pattern AliPLink = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
|
private static final Pattern AliPLink = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
|
||||||
public static Pattern Folder = Pattern.compile("www.aliyundrive.com/s/([^/]+)(/folder/([^/]+))?");
|
public static Pattern Folder = Pattern.compile("www.aliyundrive.com/s/([^/]+)(/folder/([^/]+))?");
|
||||||
public static String Token="http://catvod.fun:8001/tv/ali.txt";
|
|
||||||
public static JSONObject siteRule = null;
|
public static JSONObject siteRule = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -55,8 +53,8 @@ public class PushAgent extends Spider {
|
|||||||
|
|
||||||
public static void getToken(String token){
|
public static void getToken(String token){
|
||||||
if (token.startsWith("http")) {
|
if (token.startsWith("http")) {
|
||||||
Token = OkHttpUtil.string(token, null);
|
Misc.Token = OkHttpUtil.string(token, null);
|
||||||
}else Token = token;
|
}else Misc.Token = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JSONObject fetchRule(boolean flag,int t) {
|
public static JSONObject fetchRule(boolean flag,int t) {
|
||||||
@@ -75,7 +73,7 @@ public class PushAgent extends Spider {
|
|||||||
if(!tk.equals("")){
|
if(!tk.equals("")){
|
||||||
getToken(tk);
|
getToken(tk);
|
||||||
}
|
}
|
||||||
type = siteRule.optInt("ua", 1);
|
Misc.type = siteRule.optInt("ua", 1);
|
||||||
}
|
}
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
@@ -226,7 +224,7 @@ public class PushAgent extends Spider {
|
|||||||
if (str.isEmpty() || StopRefresh - b <= 600) {
|
if (str.isEmpty() || StopRefresh - b <= 600) {
|
||||||
try {
|
try {
|
||||||
JSONObject jSONObject = new JSONObject();
|
JSONObject jSONObject = new JSONObject();
|
||||||
jSONObject.put("refresh_token", Token);
|
jSONObject.put("refresh_token", Misc.Token);
|
||||||
String jSONObject2 = jSONObject.toString();
|
String jSONObject2 = jSONObject.toString();
|
||||||
HashMap<String, String> t = Headers();
|
HashMap<String, String> t = Headers();
|
||||||
JSONObject jSONObject3 = new JSONObject(Post("https://api.aliyundrive.com/token/refresh", jSONObject2, t));
|
JSONObject jSONObject3 = new JSONObject(Post("https://api.aliyundrive.com/token/refresh", jSONObject2, t));
|
||||||
@@ -430,9 +428,10 @@ public class PushAgent extends Spider {
|
|||||||
jSONObject4 = jSONArray.getJSONObject(0);
|
jSONObject4 = jSONArray.getJSONObject(0);
|
||||||
str = jSONObject4.getString("file_id");
|
str = jSONObject4.getString("file_id");
|
||||||
}
|
}
|
||||||
jSONObject6.put("vod_id", url);
|
if (!jSONObject6.has("vod_name")) {
|
||||||
String string3 = jSONObject3.getString("share_name");
|
String string3 = jSONObject3.getString("share_name");
|
||||||
jSONObject6.put("vod_name", string3);
|
jSONObject6.put("vod_name", string3);
|
||||||
|
}
|
||||||
jSONObject6.put("vod_play_from", "4K原画$$$AliYun");
|
jSONObject6.put("vod_play_from", "4K原画$$$AliYun");
|
||||||
ArrayList arrayList = new ArrayList();
|
ArrayList arrayList = new ArrayList();
|
||||||
String string4 = jSONObject4.getString("type");
|
String string4 = jSONObject4.getString("type");
|
||||||
@@ -470,7 +469,7 @@ public class PushAgent extends Spider {
|
|||||||
}
|
}
|
||||||
String join2 = TextUtils.join("$$$", arrayList3);
|
String join2 = TextUtils.join("$$$", arrayList3);
|
||||||
jSONObject6.put("vod_play_url", join2);
|
jSONObject6.put("vod_play_url", join2);
|
||||||
jSONObject6.put("vod_area", type + Token);
|
jSONObject6.put("vod_area", Misc.type + Misc.Token);
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
JSONArray jSONArray2 = new JSONArray();
|
JSONArray jSONArray2 = new JSONArray();
|
||||||
jSONArray2.put(jSONObject6);
|
jSONArray2.put(jSONObject6);
|
||||||
@@ -498,6 +497,14 @@ public class PushAgent extends Spider {
|
|||||||
pic = idInfo[1].trim();
|
pic = idInfo[1].trim();
|
||||||
}
|
}
|
||||||
if(pic==null) pic = Misc.getWebName(url, 1);
|
if(pic==null) pic = Misc.getWebName(url, 1);
|
||||||
|
String VodName = null,director = "",actor = "",desc = "";
|
||||||
|
if (idInfo.length > 1) {
|
||||||
|
idInfo[0]=url;
|
||||||
|
idInfo[1]=pic;
|
||||||
|
if (idInfo.length == 3) {
|
||||||
|
VodName = idInfo[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
Pattern pattern = Folder;
|
Pattern pattern = Folder;
|
||||||
Pattern pattern2 = AliPLink;
|
Pattern pattern2 = AliPLink;
|
||||||
Matcher matcher2 = pattern2.matcher(url);
|
Matcher matcher2 = pattern2.matcher(url);
|
||||||
@@ -507,12 +514,9 @@ public class PushAgent extends Spider {
|
|||||||
JSONArray lists = new JSONArray();
|
JSONArray lists = new JSONArray();
|
||||||
String typeName = Misc.getWebName(url, 0);
|
String typeName = Misc.getWebName(url, 0);
|
||||||
JSONObject vodAtom = new JSONObject();
|
JSONObject vodAtom = new JSONObject();
|
||||||
String VodName = "",director = "",actor = "",desc = "";
|
|
||||||
vodAtom.put("vod_id", url);
|
|
||||||
vodAtom.put("vod_pic", pic);
|
vodAtom.put("vod_pic", pic);
|
||||||
vodAtom.put("type_name", typeName);
|
vodAtom.put("type_name", typeName);
|
||||||
vodAtom.put("vod_content", url);
|
vodAtom.put("vod_content", url);
|
||||||
vodAtom.put("vod_area", type + Token);
|
|
||||||
if (Misc.isVip(url) && !url.contains("qq.com") && !url.contains("mgtv.com")) {
|
if (Misc.isVip(url) && !url.contains("qq.com") && !url.contains("mgtv.com")) {
|
||||||
Elements playListA = null;
|
Elements playListA = null;
|
||||||
Document doc = Jsoup.parse(OkHttpUtil.string(url, Misc.Headers(0,url)));
|
Document doc = Jsoup.parse(OkHttpUtil.string(url, Misc.Headers(0,url)));
|
||||||
@@ -537,8 +541,9 @@ public class PushAgent extends Spider {
|
|||||||
} else {
|
} else {
|
||||||
vodAtom.put("vod_play_url", "立即播放$" + url);
|
vodAtom.put("vod_play_url", "立即播放$" + url);
|
||||||
}
|
}
|
||||||
VodName = doc.select("head > title").text();
|
if(VodName!=null) VodName = doc.select("head > title").text();
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||||
vodAtom.put("vod_name", VodName);
|
vodAtom.put("vod_name", VodName);
|
||||||
vodAtom.put("vod_play_from", "jx");
|
vodAtom.put("vod_play_from", "jx");
|
||||||
lists.put(vodAtom);
|
lists.put(vodAtom);
|
||||||
@@ -552,7 +557,7 @@ public class PushAgent extends Spider {
|
|||||||
url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
|
url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
|
||||||
}
|
}
|
||||||
Document doc = Jsoup.parse(OkHttpUtil.string(url, sHeaders(true)));
|
Document doc = Jsoup.parse(OkHttpUtil.string(url, sHeaders(true)));
|
||||||
VodName = doc.select("head > title").text();
|
if(VodName!=null) VodName = doc.select("head > title").text();
|
||||||
Elements playListA = doc.select("div.episode-list-rect__item");
|
Elements playListA = doc.select("div.episode-list-rect__item");
|
||||||
if (playListA.isEmpty()) {
|
if (playListA.isEmpty()) {
|
||||||
playListA = doc.select("div.episode-list-hor .episode-item");
|
playListA = doc.select("div.episode-list-hor .episode-item");
|
||||||
@@ -576,6 +581,8 @@ public class PushAgent extends Spider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String remarks = doc.select(".intro-wrapper__update-desc").text();
|
String remarks = doc.select(".intro-wrapper__update-desc").text();
|
||||||
|
idInfo[0] = url;
|
||||||
|
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||||
vodAtom.put("vod_name", VodName);
|
vodAtom.put("vod_name", VodName);
|
||||||
vodAtom.put("vod_remarks", remarks);
|
vodAtom.put("vod_remarks", remarks);
|
||||||
vodAtom.put("vod_play_from", "jx");
|
vodAtom.put("vod_play_from", "jx");
|
||||||
@@ -589,7 +596,7 @@ public class PushAgent extends Spider {
|
|||||||
if (mgtv1.find()) {
|
if (mgtv1.find()) {
|
||||||
String Ep = "https://pcweb.api.mgtv.com/episode/list?video_id=" + mgtv1.group(2);
|
String Ep = "https://pcweb.api.mgtv.com/episode/list?video_id=" + mgtv1.group(2);
|
||||||
JSONObject Data = new JSONObject(OkHttpUtil.string(Ep, Headers()));
|
JSONObject Data = new JSONObject(OkHttpUtil.string(Ep, Headers()));
|
||||||
VodName = Data.getJSONObject("data").getJSONObject("info").getString("title");
|
if(VodName!=null) VodName = Data.getJSONObject("data").getJSONObject("info").getString("title");
|
||||||
JSONArray a = new JSONArray(Data.getJSONObject("data").getString("list"));
|
JSONArray a = new JSONArray(Data.getJSONObject("data").getString("list"));
|
||||||
if (a.length() > 0) {
|
if (a.length() > 0) {
|
||||||
for (int i = 0; i < a.length(); i++) {
|
for (int i = 0; i < a.length(); i++) {
|
||||||
@@ -609,6 +616,7 @@ public class PushAgent extends Spider {
|
|||||||
vodAtom.put("vod_play_url", "立即播放$" + url);
|
vodAtom.put("vod_play_url", "立即播放$" + url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||||
vodAtom.put("vod_name", VodName);
|
vodAtom.put("vod_name", VodName);
|
||||||
vodAtom.put("vod_play_from", "jx");
|
vodAtom.put("vod_play_from", "jx");
|
||||||
lists.put(vodAtom);
|
lists.put(vodAtom);
|
||||||
@@ -616,6 +624,7 @@ public class PushAgent extends Spider {
|
|||||||
return result.toString();
|
return result.toString();
|
||||||
} else if (Misc.isVideoFormat(url)) {
|
} else if (Misc.isVideoFormat(url)) {
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||||
vodAtom.put("vod_name", typeName);
|
vodAtom.put("vod_name", typeName);
|
||||||
vodAtom.put("type_name", "直连");
|
vodAtom.put("type_name", "直连");
|
||||||
vodAtom.put("vod_play_from", "player");
|
vodAtom.put("vod_play_from", "player");
|
||||||
@@ -629,6 +638,7 @@ public class PushAgent extends Spider {
|
|||||||
VodName = url.substring(0, 30) + "..." + url.substring(url.length() - 10);
|
VodName = url.substring(0, 30) + "..." + url.substring(url.length() - 10);
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
|
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||||
vodAtom.put("vod_name", VodName);
|
vodAtom.put("vod_name", VodName);
|
||||||
vodAtom.put("type_name", "磁力");
|
vodAtom.put("type_name", "磁力");
|
||||||
vodAtom.put("vod_play_from", "磁力测试");
|
vodAtom.put("vod_play_from", "磁力测试");
|
||||||
@@ -637,6 +647,7 @@ public class PushAgent extends Spider {
|
|||||||
result.put("list", lists);
|
result.put("list", lists);
|
||||||
return result.toString();
|
return result.toString();
|
||||||
} else if (url.startsWith("http") && (matcher2.find())) {
|
} else if (url.startsWith("http") && (matcher2.find())) {
|
||||||
|
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||||
return getAliContent(url,vodAtom);
|
return getAliContent(url,vodAtom);
|
||||||
} else if (url.startsWith("http") && (!matcher.find()) && (!matcher2.find())) {
|
} else if (url.startsWith("http") && (!matcher.find()) && (!matcher2.find())) {
|
||||||
Document doc = null;
|
Document doc = null;
|
||||||
@@ -825,14 +836,14 @@ public class PushAgent extends Spider {
|
|||||||
result.put("playUrl", "");
|
result.put("playUrl", "");
|
||||||
if(id.contains("bilibili")){
|
if(id.contains("bilibili")){
|
||||||
result.put("header", Misc.jHeaders(0,id).toString());
|
result.put("header", Misc.jHeaders(0,id).toString());
|
||||||
} else result.put("header", Misc.jHeaders(type,id).toString());
|
} else result.put("header", Misc.jHeaders(Misc.type,id).toString());
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
case "player": {
|
case "player": {
|
||||||
result.put("parse", 0);
|
result.put("parse", 0);
|
||||||
result.put("playUrl", "");
|
result.put("playUrl", "");
|
||||||
result.put("url", id);
|
result.put("url", id);
|
||||||
result.put("header", Misc.jHeaders(type,id).toString());
|
result.put("header", Misc.jHeaders(Misc.type,id).toString());
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
case "AliYun":
|
case "AliYun":
|
||||||
@@ -868,7 +879,7 @@ public class PushAgent extends Spider {
|
|||||||
result.put("parse", 1);
|
result.put("parse", 1);
|
||||||
result.put("playUrl", "");
|
result.put("playUrl", "");
|
||||||
result.put("url", id);
|
result.put("url", id);
|
||||||
result.put("header", Misc.jHeaders(type,id).toString());
|
result.put("header", Misc.jHeaders(Misc.type,id).toString());
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public class PushAgentQQ extends Spider {
|
|||||||
Misc.jsonUrl = extend;
|
Misc.jsonUrl = extend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PushAgent.fetchRule(false,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -136,9 +137,9 @@ public class PushAgentQQ extends Spider {
|
|||||||
@Override
|
@Override
|
||||||
public String searchContent(String key, boolean quick) {
|
public String searchContent(String key, boolean quick) {
|
||||||
if (key.equals("000")) {
|
if (key.equals("000")) {
|
||||||
PushAgent.type=0;
|
Misc.type=0;
|
||||||
}if (key.equals("111")) {
|
}if (key.equals("111")) {
|
||||||
PushAgent.type=1;
|
Misc.type=1;
|
||||||
}
|
}
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
JSONArray videos = new JSONArray();
|
JSONArray videos = new JSONArray();
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ public class Upyunso extends Spider {
|
|||||||
@Override
|
@Override
|
||||||
public void init(Context context, String extend) {
|
public void init(Context context, String extend) {
|
||||||
super.init(context, extend);
|
super.init(context, extend);
|
||||||
|
PushAgent.fetchRule(false,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class XBiubiu extends Spider {
|
|||||||
@Override
|
@Override
|
||||||
public void init(Context context) {
|
public void init(Context context) {
|
||||||
super.init(context);
|
super.init(context);
|
||||||
|
PushAgent.fetchRule(false,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(Context context, String extend) {
|
public void init(Context context, String extend) {
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ public class Misc {
|
|||||||
public static final String DeAgent = "Dalvik/2.1.0 (Linux; U; Android " + Build.VERSION.RELEASE + "; " + Build.MODEL + " Build/" + Build.ID + ")";
|
public static final String DeAgent = "Dalvik/2.1.0 (Linux; U; Android " + Build.VERSION.RELEASE + "; " + Build.MODEL + " Build/" + Build.ID + ")";
|
||||||
public static final String MoAgent = "Mozilla/5.0 (Linux; Android 11; Ghxi Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/12.16 SearchCraft/3.9.1 (Baidu; P1 11)";
|
public static final String MoAgent = "Mozilla/5.0 (Linux; Android 11; Ghxi Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Mobile Safari/537.36 T7/12.16 SearchCraft/3.9.1 (Baidu; P1 11)";
|
||||||
public static String jsonUrl = "http://test.xinjun58.com/sp/d.json";
|
public static String jsonUrl = "http://test.xinjun58.com/sp/d.json";
|
||||||
|
public static String Token="http://catvod.fun:8001/tv/ali.txt";
|
||||||
|
public static Integer type=1;
|
||||||
public static boolean isVip(String url) {
|
public static boolean isVip(String url) {
|
||||||
// 适配2.0.6的调用应用内解析列表的支持, 需要配合直连分析一起使用,参考cjt影视和极品直连
|
// 适配2.0.6的调用应用内解析列表的支持, 需要配合直连分析一起使用,参考cjt影视和极品直连
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user