TGsou百度
This commit is contained in:
parent
c9ebf3c7d7
commit
ccf4c0b068
|
|
@ -11,12 +11,8 @@ import com.github.catvod.utils.Util;
|
|||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class TgSearchBaidu extends Cloud {
|
||||
private static final String KEY_API_URLS = "api_urls";
|
||||
|
|
@ -58,7 +54,8 @@ public class TgSearchBaidu extends Cloud {
|
|||
this.extInfos = new String[]{extend};
|
||||
processExtendConfig(extend);
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
this.extInfos = null; // 重置,避免内存泄漏
|
||||
}
|
||||
|
|
@ -111,7 +108,11 @@ public class TgSearchBaidu extends Cloud {
|
|||
|
||||
String domain = entry.getKey();
|
||||
String sourceName = "";
|
||||
try { sourceName = entry.getValue().getAsString(); } catch (Exception e) { continue; }
|
||||
try {
|
||||
sourceName = entry.getValue().getAsString();
|
||||
} catch (Exception e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(domain) && !TextUtils.isEmpty(sourceName) && !domainMap.containsKey(domain)) {
|
||||
domainMap.put(domain, sourceName);
|
||||
|
|
@ -143,7 +144,6 @@ public class TgSearchBaidu extends Cloud {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private Map<String, String> getHeader() {
|
||||
Map<String, String> header = new HashMap<>();
|
||||
header.put("User-Agent", Util.CHROME);
|
||||
|
|
@ -176,7 +176,8 @@ public class TgSearchBaidu extends Cloud {
|
|||
if (result.getCode() == 500 || TextUtils.isEmpty(result.getBody())) continue;
|
||||
|
||||
JsonObject jsonObject = Json.safeObject(result.getBody());
|
||||
if (!jsonObject.has("code") || jsonObject.get("code").getAsInt() != 0 || !jsonObject.has("data")) continue;
|
||||
if (!jsonObject.has("code") || jsonObject.get("code").getAsInt() != 0 || !jsonObject.has("data"))
|
||||
continue;
|
||||
|
||||
JsonObject data = jsonObject.getAsJsonObject("data");
|
||||
|
||||
|
|
@ -211,7 +212,7 @@ public class TgSearchBaidu extends Cloud {
|
|||
String pic = getFirstImage(entry);
|
||||
|
||||
// 简化VodPlayBuilder的使用
|
||||
Vod vod = new Vod("push://" + vodUrl, title, pic, sourceName + " (" + originalSource + ")");
|
||||
Vod vod = new Vod(vodUrl, title, pic, sourceName + " (" + originalSource + ")");
|
||||
// 由于只有一个播放源,直接设置播放信息
|
||||
vod.setVodPlayFrom(sourceName);
|
||||
vod.setVodPlayUrl("播放源$" + vodUrl);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
3a9716ee845abbc8cc2daf9b812128f0
|
||||
1b4f17a721470f8b074d883d9d4c4839
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;3a9716ee845abbc8cc2daf9b812128f0",
|
||||
"spider": "https://andoridspidermt.netlify.app/jar/custom_spider.jar;md5;1b4f17a721470f8b074d883d9d4c4839",
|
||||
"lives": [
|
||||
{
|
||||
"name": "电视直播",
|
||||
|
|
|
|||
Loading…
Reference in New Issue