add - douban yiso

This commit is contained in:
yangqiang3504
2022-09-14 10:16:58 +08:00
parent 346c5accb5
commit e5942f3294
4 changed files with 9 additions and 22 deletions
@@ -125,7 +125,7 @@ public class PushAgent extends Spider {
return callback.getResult();
}
private static void getRefreshTk() {
public static void getRefreshTk() {
long timeSys = Time();
if (accessToken.isEmpty() || timeToken - timeSys <= 600) {
try {
@@ -793,6 +793,7 @@ public class PushAgent extends Spider {
} else result.put("header", Misc.jHeaders(Misc.type,id).toString());
return result.toString();
}
case "magnet":
case "player": {
result.put("parse", 0);
result.put("playUrl", "");
@@ -801,7 +802,6 @@ public class PushAgent extends Spider {
return result.toString();
}
case "AliYun":
getRefreshTk();
String[] split = id.split("\\+");
String str3 = split[0];
String str5 = split[2];
@@ -133,10 +133,6 @@ public class PushAgentQQ extends Spider {
Misc.jsonUrl = extend;
}
}
if (Misc.pushAgent == null) {
Misc.pushAgent = new PushAgent();
Misc.pushAgent.init(context, extend);
}
}
@@ -273,13 +269,13 @@ public class PushAgentQQ extends Spider {
@Override
public String detailContent(List<String> list) {
return Misc.pushAgent.getDetail(list);
return PushAgent.getDetail(list);
}
@Override
public String playerContent(String str, String str2, List<String> list) {
return Misc.pushAgent.player(str, str2, list);
return PushAgent.player(str, str2, list);
}
@Override
@@ -17,16 +17,12 @@ public class Upyunso extends Spider {
@Override
public void init(Context context, String extend) {
super.init(context, extend);
if (Misc.pushAgent == null) {
Misc.pushAgent = new PushAgent();
Misc.pushAgent.init(context, extend);
}
}
@Override
public String detailContent(List<String> list) {
try {
return Misc.pushAgent.getDetail(list);
return PushAgent.getDetail(list);
} catch (Exception e) {
e.printStackTrace();
return "";
@@ -42,7 +38,7 @@ public class Upyunso extends Spider {
@Override
public String playerContent(String str, String str2, List<String> list) {
return Misc.pushAgent.player(str, str2, list);
return PushAgent.player(str, str2, list);
}
@Override
@@ -20,16 +20,12 @@ public class Yiso extends Spider {
@Override
public void init(Context context, String extend) {
super.init(context);
if (Misc.pushAgent == null) {
Misc.pushAgent = new PushAgent();
Misc.pushAgent.init(context, extend);
}
}
@Override
public String detailContent(List<String> list) {
try {
return Misc.pushAgent.getDetail(list);
return PushAgent.getDetail(list);
} catch (Exception e) {
SpiderDebug.log(e);
}
@@ -37,7 +33,7 @@ public class Yiso extends Spider {
}
public String playerContent(String str, String str2, List<String> list) {
return Misc.pushAgent.player(str, str2, list);
return PushAgent.player(str, str2, list);
}
protected static HashMap<String, String> sHeaders() {
@@ -52,7 +48,7 @@ public class Yiso extends Spider {
@Override
public String searchContent(String key, boolean quick) {
try {
HashMap hashMap = new HashMap();
PushAgent.getRefreshTk();
HashMap<String, String> LT = sHeaders();
String url = "https://yiso.fun/api/search?name=" + URLEncoder.encode(key) + "&from=ali";
@@ -62,7 +58,6 @@ public class Yiso extends Spider {
JSONObject result = new JSONObject();
JSONArray videos = new JSONArray();
for (int i = 0; i < list.length(); i++) {
JSONObject jSONObject = list.getJSONObject(i);
String sourceName = jSONObject.getJSONArray("fileInfos").getJSONObject(0).getString("fileName");