add - 详情页播放6690
This commit is contained in:
@@ -35,9 +35,11 @@ public class PushAgent extends Spider {
|
||||
private static final Map<String, Map<String, String>> dizz = new HashMap();
|
||||
private static final ReentrantLock ReentrantLock = new ReentrantLock();
|
||||
private static final long n = 0;
|
||||
public static Integer type=1;
|
||||
private static final String SiteUrl = "https://api.aliyundrive.com";
|
||||
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 String Token="http://catvod.fun:8001/tv/ali.txt";
|
||||
public static JSONObject siteRule = null;
|
||||
|
||||
@Override
|
||||
@@ -53,8 +55,8 @@ public class PushAgent extends Spider {
|
||||
|
||||
public static void getToken(String token){
|
||||
if (token.startsWith("http")) {
|
||||
Misc.Token = OkHttpUtil.string(token, null);
|
||||
}else Misc.Token = token;
|
||||
Token = OkHttpUtil.string(token, null);
|
||||
}else Token = token;
|
||||
}
|
||||
|
||||
public static JSONObject fetchRule(boolean flag,int t) {
|
||||
@@ -73,7 +75,7 @@ public class PushAgent extends Spider {
|
||||
if(!tk.equals("")){
|
||||
getToken(tk);
|
||||
}
|
||||
Misc.type = siteRule.optInt("ua", 1);
|
||||
type = siteRule.optInt("ua", 1);
|
||||
}
|
||||
return jo;
|
||||
}
|
||||
@@ -224,7 +226,7 @@ public class PushAgent extends Spider {
|
||||
if (str.isEmpty() || StopRefresh - b <= 600) {
|
||||
try {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
jSONObject.put("refresh_token", Misc.Token);
|
||||
jSONObject.put("refresh_token", Token);
|
||||
String jSONObject2 = jSONObject.toString();
|
||||
HashMap<String, String> t = Headers();
|
||||
JSONObject jSONObject3 = new JSONObject(Post("https://api.aliyundrive.com/token/refresh", jSONObject2, t));
|
||||
@@ -469,7 +471,7 @@ public class PushAgent extends Spider {
|
||||
}
|
||||
String join2 = TextUtils.join("$$$", arrayList3);
|
||||
jSONObject6.put("vod_play_url", join2);
|
||||
jSONObject6.put("vod_area", Misc.type + Misc.Token);
|
||||
jSONObject6.put("vod_area", type + Token);
|
||||
JSONObject result = new JSONObject();
|
||||
JSONArray jSONArray2 = new JSONArray();
|
||||
jSONArray2.put(jSONObject6);
|
||||
@@ -514,9 +516,11 @@ public class PushAgent extends Spider {
|
||||
JSONArray lists = new JSONArray();
|
||||
String typeName = Misc.getWebName(url, 0);
|
||||
JSONObject vodAtom = new JSONObject();
|
||||
vodAtom.put("vod_id", url);
|
||||
vodAtom.put("vod_pic", pic);
|
||||
vodAtom.put("type_name", typeName);
|
||||
vodAtom.put("vod_content", url);
|
||||
vodAtom.put("vod_area", type + Token);
|
||||
if (Misc.isVip(url) && !url.contains("qq.com") && !url.contains("mgtv.com")) {
|
||||
Elements playListA = null;
|
||||
Document doc = Jsoup.parse(OkHttpUtil.string(url, Misc.Headers(0,url)));
|
||||
@@ -541,9 +545,8 @@ public class PushAgent extends Spider {
|
||||
} else {
|
||||
vodAtom.put("vod_play_url", "立即播放$" + url);
|
||||
}
|
||||
if(VodName!=null) VodName = doc.select("head > title").text();
|
||||
VodName = doc.select("head > title").text();
|
||||
JSONObject result = new JSONObject();
|
||||
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||
vodAtom.put("vod_name", VodName);
|
||||
vodAtom.put("vod_play_from", "jx");
|
||||
lists.put(vodAtom);
|
||||
@@ -557,7 +560,7 @@ public class PushAgent extends Spider {
|
||||
url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
|
||||
}
|
||||
Document doc = Jsoup.parse(OkHttpUtil.string(url, sHeaders(true)));
|
||||
if(VodName!=null) VodName = doc.select("head > title").text();
|
||||
VodName = doc.select("head > title").text();
|
||||
Elements playListA = doc.select("div.episode-list-rect__item");
|
||||
if (playListA.isEmpty()) {
|
||||
playListA = doc.select("div.episode-list-hor .episode-item");
|
||||
@@ -581,8 +584,6 @@ public class PushAgent extends Spider {
|
||||
}
|
||||
|
||||
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_remarks", remarks);
|
||||
vodAtom.put("vod_play_from", "jx");
|
||||
@@ -596,7 +597,7 @@ public class PushAgent extends Spider {
|
||||
if (mgtv1.find()) {
|
||||
String Ep = "https://pcweb.api.mgtv.com/episode/list?video_id=" + mgtv1.group(2);
|
||||
JSONObject Data = new JSONObject(OkHttpUtil.string(Ep, Headers()));
|
||||
if(VodName!=null) VodName = Data.getJSONObject("data").getJSONObject("info").getString("title");
|
||||
VodName = Data.getJSONObject("data").getJSONObject("info").getString("title");
|
||||
JSONArray a = new JSONArray(Data.getJSONObject("data").getString("list"));
|
||||
if (a.length() > 0) {
|
||||
for (int i = 0; i < a.length(); i++) {
|
||||
@@ -616,7 +617,6 @@ public class PushAgent extends Spider {
|
||||
vodAtom.put("vod_play_url", "立即播放$" + url);
|
||||
}
|
||||
}
|
||||
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||
vodAtom.put("vod_name", VodName);
|
||||
vodAtom.put("vod_play_from", "jx");
|
||||
lists.put(vodAtom);
|
||||
@@ -624,7 +624,6 @@ public class PushAgent extends Spider {
|
||||
return result.toString();
|
||||
} else if (Misc.isVideoFormat(url)) {
|
||||
JSONObject result = new JSONObject();
|
||||
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||
vodAtom.put("vod_name", typeName);
|
||||
vodAtom.put("type_name", "直连");
|
||||
vodAtom.put("vod_play_from", "player");
|
||||
@@ -638,7 +637,6 @@ public class PushAgent extends Spider {
|
||||
VodName = url.substring(0, 30) + "..." + url.substring(url.length() - 10);
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||
vodAtom.put("vod_name", VodName);
|
||||
vodAtom.put("type_name", "磁力");
|
||||
vodAtom.put("vod_play_from", "磁力测试");
|
||||
@@ -647,6 +645,7 @@ public class PushAgent extends Spider {
|
||||
result.put("list", lists);
|
||||
return result.toString();
|
||||
} else if (url.startsWith("http") && (matcher2.find())) {
|
||||
if(VodName!=null) vodAtom.put("vod_name", VodName);
|
||||
vodAtom.put("vod_id", TextUtils.join("###", idInfo));
|
||||
return getAliContent(url,vodAtom);
|
||||
} else if (url.startsWith("http") && (!matcher.find()) && (!matcher2.find())) {
|
||||
@@ -836,14 +835,14 @@ public class PushAgent extends Spider {
|
||||
result.put("playUrl", "");
|
||||
if(id.contains("bilibili")){
|
||||
result.put("header", Misc.jHeaders(0,id).toString());
|
||||
} else result.put("header", Misc.jHeaders(Misc.type,id).toString());
|
||||
} else result.put("header", Misc.jHeaders(type,id).toString());
|
||||
return result.toString();
|
||||
}
|
||||
case "player": {
|
||||
result.put("parse", 0);
|
||||
result.put("playUrl", "");
|
||||
result.put("url", id);
|
||||
result.put("header", Misc.jHeaders(Misc.type,id).toString());
|
||||
result.put("header", Misc.jHeaders(type,id).toString());
|
||||
return result.toString();
|
||||
}
|
||||
case "AliYun":
|
||||
@@ -879,7 +878,7 @@ public class PushAgent extends Spider {
|
||||
result.put("parse", 1);
|
||||
result.put("playUrl", "");
|
||||
result.put("url", id);
|
||||
result.put("header", Misc.jHeaders(Misc.type,id).toString());
|
||||
result.put("header", Misc.jHeaders(type,id).toString());
|
||||
return result.toString();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user