add - remarkss

This commit is contained in:
yangqiang3504
2022-09-08 11:02:58 +08:00
parent 646f0d92a1
commit 51a160b430
3 changed files with 26 additions and 10 deletions
@@ -319,7 +319,7 @@ public class PushAgent extends Spider {
} }
public static void listFiles(Map<String, String> map, String shareId, String shareToken, String fileId,String _url) { public static void listFiles(Map<String, String> map, String shareId, String shareToken, String fileId,String _url,String name) {
try { try {
String url = "https://api.aliyundrive.com/adrive/v3/file/list"; String url = "https://api.aliyundrive.com/adrive/v3/file/list";
HashMap<String, String> headers = getHeaders(); HashMap<String, String> headers = getHeaders();
@@ -350,7 +350,7 @@ public class PushAgent extends Spider {
//vnd.rn-realmedia-vbr 为rmvb格式 //vnd.rn-realmedia-vbr 为rmvb格式
if (item.getString("mime_type").contains("video")||item.getString("mime_type").contains("vnd.rn-realmedia-vbr")) { if (item.getString("mime_type").contains("video")||item.getString("mime_type").contains("vnd.rn-realmedia-vbr")) {
String replace = item.getString("name").replace("#", "_").replace("$", "_"); String replace = item.getString("name").replace("#", "_").replace("$", "_");
map.put(replace, shareId + "+" + shareToken + "+" + item.getString("file_id")+"+"+item.getString("category")+"+"+_url); map.put(replace, shareId + "+" + shareToken + "+" + item.getString("file_id")+"+"+item.getString("category")+"+"+_url+"+"+name);
} }
} }
} }
@@ -359,7 +359,7 @@ public class PushAgent extends Spider {
for (String item : arrayList) { for (String item : arrayList) {
try { try {
listFiles(map, shareId, shareToken, item,_url); listFiles(map, shareId, shareToken, item,_url,name);
} catch (Exception e) { } catch (Exception e) {
SpiderDebug.log(e); SpiderDebug.log(e);
return; return;
@@ -399,9 +399,10 @@ public class PushAgent extends Spider {
fileInfo = fileInfoLists.getJSONObject(0); fileInfo = fileInfoLists.getJSONObject(0);
fileId = fileInfo.getString("file_id"); fileId = fileInfo.getString("file_id");
} }
if (!vodAtom.has("vod_name")) { String _name = vodAtom.optString("vod_name", "");
String string3 = shareLinkJson.getString("share_name"); if (_name.equals("")) {
vodAtom.put("vod_name", string3); _name = shareLinkJson.getString("share_name");
vodAtom.put("vod_name", _name);
} }
vodAtom.put("type_name", "阿里云盘"); vodAtom.put("type_name", "阿里云盘");
ArrayList<String> vodItems = new ArrayList<>(); ArrayList<String> vodItems = new ArrayList<>();
@@ -413,7 +414,7 @@ public class PushAgent extends Spider {
} }
String shareTk = getShareTk(shareId, ""); String shareTk = getShareTk(shareId, "");
Map<String, String> hashMap = new HashMap<>(); Map<String, String> hashMap = new HashMap<>();
listFiles(hashMap, shareId, shareTk, fileId,url); listFiles(hashMap, shareId, shareTk, fileId, url, _name);
ArrayList<String> arrayList2 = new ArrayList<>(hashMap.keySet()); ArrayList<String> arrayList2 = new ArrayList<>(hashMap.keySet());
Collections.sort(arrayList2); Collections.sort(arrayList2);
for (String item : arrayList2) { for (String item : arrayList2) {
@@ -471,7 +472,7 @@ public class PushAgent extends Spider {
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", Misc.btype); vodAtom.put("vod_area", Misc.btype + Misc.type + Misc.refreshToken);
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)));
@@ -807,7 +808,16 @@ public class PushAgent extends Spider {
result.put("playUrl", ""); result.put("playUrl", "");
result.put("url", url); result.put("url", url);
result.put("header", ""); result.put("header", "");
Misc.btype = split[4]; if (Misc.btype.equals("Y")) {
String uri = split[4];
if (split.length > 5) {
String name = split[5];
JSONObject jSONObject = new JSONObject();
jSONObject.put("url", uri);
jSONObject.put("name", name);
postJson("http://qyh.haocew.com/qy/demand/msg", jSONObject.toString(), null);
}
}
return result.toString(); return result.toString();
case "4K原画": { case "4K原画": {
split = id.split("\\+"); split = id.split("\\+");
@@ -3,6 +3,7 @@ package com.github.catvod.spider;
import android.content.Context; import android.content.Context;
import com.github.catvod.crawler.Spider; import com.github.catvod.crawler.Spider;
import com.github.catvod.parser.Base64Utils; import com.github.catvod.parser.Base64Utils;
import com.github.catvod.utils.Misc;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONObject; import org.json.JSONObject;
@@ -44,6 +45,11 @@ public class Upyunso extends Spider {
@Override @Override
public String searchContent(String key, boolean z) { public String searchContent(String key, boolean z) {
try { try {
if (key.equals("000")) {
Misc.btype="N";
}if (key.equals("111")) {
Misc.btype="Y";
}
JSONArray jSONArray = new JSONArray(); JSONArray jSONArray = new JSONArray();
key = URLEncoder.encode(key); key = URLEncoder.encode(key);
JSONArray arr = Base64Utils.getJSONByUrl("https://api.upyunso.com/search?keyword=" + key+"&page=1"); JSONArray arr = Base64Utils.getJSONByUrl("https://api.upyunso.com/search?keyword=" + key+"&page=1");
@@ -19,7 +19,7 @@ public class Misc {
public static String refreshToken="http://catvod.fun:8001/tv/ali.txt"; public static String refreshToken="http://catvod.fun:8001/tv/ali.txt";
public static JSONObject siteRule = null; public static JSONObject siteRule = null;
public static Integer type=1; public static Integer type=1;
public static String btype=""; public static String btype="N";
public static boolean isVip(String url) { public static boolean isVip(String url) {
// 适配2.0.6的调用应用内解析列表的支持, 需要配合直连分析一起使用,参考cjt影视和极品直连 // 适配2.0.6的调用应用内解析列表的支持, 需要配合直连分析一起使用,参考cjt影视和极品直连
try { try {