diff --git a/app/src/main/java/com/github/catvod/spider/AppYsV2.java b/app/src/main/java/com/github/catvod/spider/AppYsV2.java index 5c548843..1890f93a 100644 --- a/app/src/main/java/com/github/catvod/spider/AppYsV2.java +++ b/app/src/main/java/com/github/catvod/spider/AppYsV2.java @@ -1,23 +1,19 @@ package com.github.catvod.spider; import android.content.Context; -import android.text.TextUtils; import com.github.catvod.crawler.Spider; import com.github.catvod.crawler.SpiderDebug; import com.github.catvod.net.OkHttp; import com.github.catvod.utils.Util; +import org.apache.commons.lang3.StringUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -29,7 +25,7 @@ public class AppYsV2 extends Spider { @Override public void init(Context context, String extend) throws Exception { - super.init(context, extend); + super.init(context,extend); try { extInfos = extend.split("###"); } catch (Exception ignored) { @@ -365,7 +361,7 @@ public class AppYsV2 extends Spider { for (int i = 0; i < array.length(); i++) { strings.add(array.getString(i)); } - return TextUtils.join(",", strings); + return StringUtils.join(strings, ","); } catch (JSONException e) { return ""; } @@ -554,11 +550,7 @@ public class AppYsV2 extends Spider { playFlags.add(flag); playUrls.add(from.getString("url")); String purl = from.optString("parse_api").trim(); - ArrayList parseUrls = parseUrlMap.get(flag); - if (parseUrls == null) { - parseUrls = new ArrayList<>(); - parseUrlMap.put(flag, parseUrls); - } + ArrayList parseUrls = parseUrlMap.get(flag)==null?new ArrayList<>():parseUrlMap.get(flag); if (!purl.isEmpty() && !parseUrls.contains(purl)) parseUrls.add(purl); } } else if (URL.contains("xgapp")) { @@ -581,11 +573,7 @@ public class AppYsV2 extends Spider { playFlags.add(flag); playUrls.add(from.getString("url")); String purl = from.optString("parse_api").trim(); - ArrayList parseUrls = parseUrlMap.get(flag); - if (parseUrls == null) { - parseUrls = new ArrayList<>(); - parseUrlMap.put(flag, parseUrls); - } + ArrayList parseUrls = parseUrlMap.get(flag)==null?new ArrayList<>():parseUrlMap.get(flag); if (!purl.isEmpty() && !parseUrls.contains(purl)) parseUrls.add(purl); } } else if (/*urlPattern2.matcher(URL).find()*/URL.contains(".vod")) { @@ -613,12 +601,7 @@ public class AppYsV2 extends Spider { String[] parse2 = from.getJSONObject("player_info").optString("parse2").split(","); parses.addAll(Arrays.asList(parse1)); parses.addAll(Arrays.asList(parse2)); - ArrayList parseUrls = parseUrlMap.get(flag); - if (parseUrls == null) { - parseUrls = new ArrayList<>(); - parseUrlMap.put(flag, parseUrls); - } - for (String purl : parses) { + ArrayList parseUrls = parseUrlMap.get(flag)==null?new ArrayList<>():parseUrlMap.get(flag); for (String purl : parses) { if (purl.contains("http")) { Matcher matcher = parsePattern1.matcher(purl); if (matcher.find()) { @@ -681,11 +664,11 @@ public class AppYsV2 extends Spider { } } playFlags.add(flag); - playUrls.add(TextUtils.join("#", urls)); + playUrls.add(StringUtils.join(urls, "#")); } } - vod.put("vod_play_from", TextUtils.join("$$$", playFlags)); - vod.put("vod_play_url", TextUtils.join("$$$", playUrls)); + vod.put("vod_play_from", StringUtils.join(playFlags, "$$$")); + vod.put("vod_play_url", StringUtils.join(playUrls, "$$$")); } // ######视频地址 @@ -782,7 +765,7 @@ public class AppYsV2 extends Spider { } else if (jsonPlayData.has("User-Agent")) { ua = jsonPlayData.optString("User-Agent", ""); } - if (ua.trim().length() > 0) { + if (!ua.trim().isEmpty()) { headers.put("User-Agent", " " + ua); } String referer = ""; @@ -791,7 +774,7 @@ public class AppYsV2 extends Spider { } else if (jsonPlayData.has("Referer")) { referer = jsonPlayData.optString("Referer", ""); } - if (referer.trim().length() > 0) { + if (!referer.trim().isEmpty()) { headers.put("Referer", " " + referer); } diff --git a/app/src/main/java/com/github/catvod/spider/NG.java b/app/src/main/java/com/github/catvod/spider/NG.java new file mode 100644 index 00000000..b3d21629 --- /dev/null +++ b/app/src/main/java/com/github/catvod/spider/NG.java @@ -0,0 +1,437 @@ +package com.github.catvod.spider; + + +import com.github.catvod.bean.Class; +import com.github.catvod.bean.Filter; +import com.github.catvod.bean.Result; +import com.github.catvod.bean.Vod; +import com.github.catvod.crawler.Spider; +import com.github.catvod.crawler.SpiderDebug; +import com.github.catvod.net.OkHttp; +import com.github.catvod.utils.Json; +import com.github.catvod.utils.ProxyVideo; +import com.github.catvod.utils.Util; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; + +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +public class NG extends Spider { + private final String FIND_VIDEO_VOD_LIST = "/api.php/provide/vod_list"; + private final String FIND_CLASSIFICATION = "/api.php/provide/home_nav"; + private final String VIDEO_DETAIL = "/api.php/provide/vod_detail"; + private final String SEARCH_SEARCH = "/api.php/provide/search_result"; + private final List classList = new ArrayList<>(); + private final LinkedHashMap> filters = new LinkedHashMap<>(); + private final String COMMON_URL = Util.base64Decode("aHR0cDovL3lzLmNoYW5nbWVuZ3l1bi5jb20="); + + private Map getParams() { + Map hashMap = new HashMap<>(); + hashMap.put("devices", "android"); + hashMap.put("deviceModel", "ASUS_I003DD"); + hashMap.put("deviceBrand", "ASUS"); + hashMap.put("deviceVersion", "9"); + hashMap.put("deviceScreen", "2340*1080"); + hashMap.put("appVersionCode", "9"); + hashMap.put("appVersionName", "1.0.9"); + hashMap.put("time", String.valueOf(System.currentTimeMillis() / 1000)); + hashMap.put("imei", ""); + hashMap.put("app", "ylys"); + return hashMap; + } + + public Map getHeaders() { + Map headers = new HashMap<>(); + long currentTimeMillis = System.currentTimeMillis(); + headers.put("timeMillis", String.valueOf(currentTimeMillis)); + headers.put("sign", Util.MD5(Util.base64Decode("I3VCRnN6ZEVNMG9MMEpSbkA=") + currentTimeMillis)); + return headers; + } + + @Override + public String homeContent(boolean filter) { + if (classList.isEmpty()) { + String string = OkHttp.string(COMMON_URL + FIND_CLASSIFICATION, getParams(), getHeaders()); + + JsonArray filterList = JsonParser.parseString(string).getAsJsonArray(); + for (int index = 0; index < filterList.size(); index++) { + if (index == 0) continue; + JsonObject obj = filterList.get(index).getAsJsonObject(); + int id = obj.get("id").getAsInt(); + String name = obj.get("name").getAsString(); + Class clazz = new Class(String.valueOf(id), name); + classList.add(clazz); + } + } + return Result.string(classList, filters); + } + + @Override + public String categoryContent(String tid, String pg, boolean filter, HashMap extend) { + try { + Map params = new HashMap<>(getParams()); + for (String s : extend.keySet()) { + params.put(s, URLEncoder.encode(extend.get(s), "UTF-8")); + } + params.put("page", pg); + params.put("id", tid); + String string = OkHttp.string(COMMON_URL + FIND_VIDEO_VOD_LIST, params, getHeaders()); + Type type = new TypeToken>() { + }.getType(); + Rst resp = Json.parseSafe(string, type); + List vodList = new ArrayList<>(); + if (resp != null && resp.isSuccess()) { + for (It it : resp.getList()) { + vodList.add(it.toVod()); + } + } else { + SpiderDebug.log("ng cate error: " + string); + } + + return Result.string(classList, vodList, filters); + } catch (Exception e) { + throw new RuntimeException(e); + } + + } + + @Override + public String detailContent(List ids) { + Map map = new HashMap<>(getParams()); + map.put("id", ids.get(0)); + String string = OkHttp.string(COMMON_URL + VIDEO_DETAIL, map, getHeaders()); + Type type = new TypeToken>() { + }.getType(); + Rst
dt = Json.parseSafe(string, type); + if (!dt.isSuccess()) { + SpiderDebug.log("ng detail err: " + dt.getMsg()); + return Result.error(dt.getMsg()); + } + return Result.string(dt.data.toVod()); + } + + @Override + public String playerContent(String flag, String id, List vipFlags) { + String string = OkHttp.string(id); + Type type = new TypeToken>() { + }.getType(); + Rst rst = Json.parseSafe(string, type); + if (!rst.isSuccess()) { + SpiderDebug.log("play err: " + rst.getMsg()); + return Result.error(rst.getMsg()); + } + Map filter = new HashMap<>(); + + for (String s : rst.getData().getHeader().keySet()) { + if (s.equals("User-Agent")) { + filter.put(s, rst.getData().getHeader().get(s)); + } + } + + return Result.get().url(ProxyVideo.buildCommonProxyUrl(rst.getData().getUrl(), filter)).string(); + + } + + @Override + public String searchContent(String key, boolean quick) throws UnsupportedEncodingException { + Map params = new HashMap<>(getParams()); + params.put("video_name", URLEncoder.encode(key,"UTF-8")); + String string = OkHttp.string(COMMON_URL + SEARCH_SEARCH, params, getHeaders()); + Type type = new TypeToken>>() { + }.getType(); + Rst> rst = Json.parseSafe(string, type); + if (!rst.isSuccess()) { + SpiderDebug.log("ng search error: " + rst.getMsg()); + return Result.error(rst.getMsg()); + } + return Result.string(rst.getData().get(0).toVodList()); + + } + + public static class Rst { + private int code; + private String msg; + private String limit; + private int pagecount; + private int total; + private List list; + private T data; + + public boolean isSuccess() { + return code == 1; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public String getLimit() { + return limit; + } + + public void setLimit(String limit) { + this.limit = limit; + } + + public int getPagecount() { + return pagecount; + } + + public void setPagecount(int pagecount) { + this.pagecount = pagecount; + } + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + } + + public static class It { + private int id; + private String img; + private String name; + private String score; + private String msg; + + public Vod toVod() { + Vod vod = new Vod(); + vod.setVodId(String.valueOf(id)); + vod.setVodName(name); + vod.setVodRemarks(score); + vod.setVodPic(img); + return vod; + } + } + + public static class Dt { + private String name; + private String year; + private String score; + private int hits; + private String type; + private String img; + private String info; + @SerializedName("total_count") + private int totalCount; + @SerializedName("player_info") + private List playerInfo; + + public Vod toVod() { + Vod vod = new Vod(); + vod.setVodId(name + score); + vod.setVodName(name); + vod.setVodPic(img); + vod.setVodTag(type); + vod.setVodRemarks(year); + vod.setVodContent(info); + + StringBuilder playFrom = new StringBuilder(); + StringBuilder playUrl = new StringBuilder(); + + for (DtIt info : playerInfo) { + playFrom.append(info.getShow()).append("$$$"); + for (VtInfo vtInfo : info.getVideoInfo()) { + + playUrl.append(vtInfo.getName()).append("$").append(vtInfo.getUrl().get(0)); + playUrl.append("#"); + + } + playUrl.append("$$$"); + } + + vod.setVodPlayFrom(playFrom.toString()); + vod.setVodPlayUrl(playUrl.toString()); + return vod; + } + } + + public static class DtIt { + private int id; + private String from; + private String show; + @SerializedName("url_count") + private int urlCount; + @SerializedName("video_info") + private List videoInfo; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + + public String getShow() { + return show; + } + + public void setShow(String show) { + this.show = show; + } + + public int getUrlCount() { + return urlCount; + } + + public void setUrlCount(int urlCount) { + this.urlCount = urlCount; + } + + public List getVideoInfo() { + return videoInfo; + } + + public void setVideoInfo(List videoInfo) { + this.videoInfo = videoInfo; + } + } + + public static class VtInfo { + private int id; + private String name; + private String pic; + private List url; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPic() { + return pic; + } + + public void setPic(String pic) { + this.pic = pic; + } + + public List getUrl() { + return url; + } + + public void setUrl(List url) { + this.url = url; + } + } + + public static class PlayRst { + private String url; + private Map header; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public Map getHeader() { + return header; + } + + public void setHeader(Map header) { + this.header = header; + } + } + + public static class SearchRst { + private int id; + private String name; + private List data; + + public List toVodList() { + List list = new ArrayList<>(); + for (SearchRstItem datum : data) { + list.add(datum.toVOd()); + } + return list; + } + } + + public static class SearchRstItem { + private int id; + private int type; + @SerializedName("video_name") + private String videoName; + private String qingxidu; + private String img; + private String director; + @SerializedName("main_actor") + private String mainActor; + private String category; + + public Vod toVOd() { + Vod vod = new Vod(); + vod.setVodId(String.valueOf(id)); + vod.setVodTag(qingxidu); + vod.setVodPic(img); + vod.setVodRemarks(category); + vod.setVodName(videoName); + vod.setVodActor(mainActor); + return vod; + } + } +} diff --git a/app/src/main/java/com/github/catvod/spider/QxiTv.java b/app/src/main/java/com/github/catvod/spider/QxiTv.java index 41a0b792..e85839f4 100644 --- a/app/src/main/java/com/github/catvod/spider/QxiTv.java +++ b/app/src/main/java/com/github/catvod/spider/QxiTv.java @@ -6,14 +6,7 @@ import com.github.catvod.bean.Vod; import com.github.catvod.crawler.Spider; import com.github.catvod.net.OkHttp; import com.github.catvod.utils.Util; -import com.google.gson.Gson; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.orhanobut.logger.Logger; -import org.json.JSONArray; -import org.json.JSONObject; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; @@ -25,16 +18,16 @@ import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Locale; +import java.util.Objects; import java.util.regex.Matcher; import java.util.regex.Pattern; public class QxiTv extends Spider { private static final String siteUrl = "https://www.7xi.tv"; - private static final String cateUrl = siteUrl + "/index.php/api/vod"; - private static final String detailUrl = siteUrl + "/voddetail/"; + private static final String cateUrl = siteUrl + "/vodtype/"; private static final String searchUrl = siteUrl + "/vodsearch/page/1/wd/"; + private static final String playUrl = siteUrl + "/FosiPlayer/API.php"; private HashMap getHeaders() { HashMap headers = new HashMap<>(); @@ -46,16 +39,15 @@ public class QxiTv extends Spider { public String homeContent(boolean filter) throws Exception { List list = new ArrayList<>(); List classes = new ArrayList<>(); + Document doc = Jsoup.parse(OkHttp.string(siteUrl, getHeaders())); - int index = 1; - for (Element element : doc.select("h4.title-h")) { - String typeId = element.select("a").attr("href"); - String typeName = element.select("span").text(); - if (!"".equals(typeName) && index != 1 && index != 6) { - classes.add(new Class(typeId, typeName.replace(" 查看更多",""))); + for (Element element : doc.select("ul.swiper-wrapper > li.swiper-slide > a")) { + if(element.text().contains("留言")){ + break; } - index++; + classes.add(new Class(element.attr("href"),element.text())); } + for (Element element : doc.select("a.public-list-exp")) { try { String pic = element.select("img").attr("data-src"); @@ -64,9 +56,8 @@ public class QxiTv extends Spider { if (!pic.startsWith("http")) { pic = siteUrl + pic; } - String id = url.split("/")[2]; - list.add(new Vod(id, name, pic)); - } catch (Exception e) { + list.add(new Vod(url, name, pic)); + } catch (Exception ignored) { } @@ -102,35 +93,29 @@ public class QxiTv extends Spider { @Override public String categoryContent(String tid, String pg, boolean filter, HashMap extend) throws Exception { - List list = new ArrayList<>(); - String target = cateUrl + tid; - HashMap params = new HashMap<>(); - params.put("type", tid.split("/")[2].replace(".html", "")); - params.put("page", pg); - String time = String.valueOf(System.currentTimeMillis()); - params.put("time", time); - String string = "DS" + time + "DCC147D11943AF75"; - params.put("key", MD5(string)); - String data = OkHttp.post(target, params); - Gson gson = new Gson(); - JsonObject jsonObject = gson.fromJson(data, JsonObject.class); - JsonArray jsonArray = jsonObject.getAsJsonArray("list"); - for (JsonElement element : jsonArray) { - String id = String.valueOf(element.getAsJsonObject().get("vod_id")); - String name = String.valueOf(element.getAsJsonObject().get("vod_name")).replace("\"", ""); - String pic = String.valueOf(element.getAsJsonObject().get("vod_pic")).replace("\"", ""); - if (!pic.startsWith("http")) { - pic = siteUrl + pic; - } - list.add(new Vod(id, name, pic)); + String url = siteUrl + tid; + if(!Objects.equals(pg, "1")){ + url += "-" + pg; } - Integer total = (Integer.parseInt(pg) + 1) * 20; - return Result.string(Integer.parseInt(pg), Integer.parseInt(pg) + 1, 20, total, list); + String res = OkHttp.string(url, getHeaders()); + Document document = Jsoup.parse(res); + List list = new ArrayList<>(); + Elements vodList = document.select("a.public-list-exp"); + for (Element element : vodList) { + String vodId = element.attr("href"); + String title = element.attr("title"); + String img = element.select("img").attr("data-src"); + String remark = element.select(".public-list-prb").val(); + list.add(new Vod(vodId, title, img, remark)); + } + + Integer total = Integer.MAX_VALUE; + return Result.string(Integer.parseInt(pg), Integer.parseInt(pg) + 1, list.size(), total, list); } @Override public String detailContent(List ids) throws Exception { - Document doc = Jsoup.parse(OkHttp.string(detailUrl.concat(ids.get(0)).concat(".html"), getHeaders())); + Document doc = Jsoup.parse(OkHttp.string(siteUrl + ids.get(0), getHeaders())); String name = doc.select("div.this-desc-title").text(); String pic = doc.select("div.this-pic-bj").attr("style").replace("background-image: url('", "").replace("')", ""); String year = doc.select("div.this-desc-info > span").get(1).text(); @@ -185,8 +170,7 @@ public class QxiTv extends Spider { if (!pic.startsWith("http")) { pic = siteUrl + pic; } - String id = url.split("/")[2]; - list.add(new Vod(id, name, pic)); + list.add(new Vod(url, name, pic)); } catch (Exception e) { } } @@ -205,6 +189,7 @@ public class QxiTv extends Spider { url = matcher.group(1); url = url.replace("\\/","/") + "m3u8"; } + return Result.get().url(url).header(getHeaders()).string(); } } \ No newline at end of file diff --git a/app/src/main/java/com/github/catvod/utils/Json.java b/app/src/main/java/com/github/catvod/utils/Json.java index 8f41fcac..0e04437b 100644 --- a/app/src/main/java/com/github/catvod/utils/Json.java +++ b/app/src/main/java/com/github/catvod/utils/Json.java @@ -1,8 +1,13 @@ package com.github.catvod.utils; +import com.github.catvod.crawler.SpiderDebug; +import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import com.google.gson.JsonSyntaxException; + +import java.lang.reflect.Type; public class Json { @@ -22,4 +27,14 @@ public class Json { return new JsonObject(); } } + + public static T parseSafe(String json, Type t) { + try { + return new Gson().fromJson(json, t); + } catch (JsonSyntaxException e) { + SpiderDebug.log("json parse error: " + e.getMessage() + "\n" + " " + json); + return null; + } + } + } diff --git a/app/src/main/java/com/github/catvod/utils/Util.java b/app/src/main/java/com/github/catvod/utils/Util.java index 924d3760..2b3afd01 100644 --- a/app/src/main/java/com/github/catvod/utils/Util.java +++ b/app/src/main/java/com/github/catvod/utils/Util.java @@ -5,6 +5,7 @@ import android.content.ClipboardManager; import android.content.Context; import android.net.Uri; import android.os.Build; +import android.util.Base64; import android.view.View; import android.view.ViewGroup; import android.webkit.ValueCallback; @@ -17,6 +18,7 @@ import org.mozilla.universalchardet.UniversalDetector; import java.math.BigInteger; import java.net.URI; +import java.nio.charset.Charset; import java.security.MessageDigest; import java.util.Arrays; import java.util.HashMap; @@ -25,11 +27,6 @@ import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; -import okhttp3.Cookie; -import okhttp3.Headers; -import okhttp3.internal.http.HttpHeaders; -import okhttp3.internal.http2.Header; - public class Util { public static final Pattern RULE = Pattern.compile("http((?!http).){12,}?\\.(m3u8|mp4|mkv|flv|mp3|m4a|aac)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|mkv|flv|mp3|m4a|aac)|http((?!http).)*?video/tos*"); @@ -273,4 +270,8 @@ public class Util { return ""; } } + + public static String base64Decode(String s) { + return new String(android.util.Base64.decode(s, Base64.DEFAULT), Charset.defaultCharset()); + } } diff --git a/app/src/test/java/NGTest.java b/app/src/test/java/NGTest.java new file mode 100644 index 00000000..fa959541 --- /dev/null +++ b/app/src/test/java/NGTest.java @@ -0,0 +1,96 @@ +import android.app.Application; + +import com.github.catvod.spider.Init; +import com.github.catvod.spider.NG; +import com.github.catvod.utils.Json; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonObject; + +import org.junit.Assert; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.RuntimeEnvironment; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; + +@RunWith(RobolectricTestRunner.class) +public class NGTest { + // @Mock + private Application mockContext; + + private NG spider; + + @org.junit.Before + public void setUp() throws Exception { + mockContext = RuntimeEnvironment.application; + Init.init(mockContext); + spider = new NG(); + spider.init(mockContext, "https://www.czzy.site/"); + } + + @org.junit.Test + public void homeContent() throws Exception { + String content = spider.homeContent(true); + JsonObject map = Json.safeObject(content); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + + System.out.println("homeContent--" + gson.toJson(map)); + + //Assert.assertFalse(map.getAsJsonArray("list").isEmpty()); + } + + @org.junit.Test + public void homeVideoContent() throws Exception { + String content = spider.homeVideoContent(); + JsonObject map = Json.safeObject(content); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + + System.out.println("homeVideoContent--" + gson.toJson(map)); + + //Assert.assertFalse(map.getAsJsonArray("list").isEmpty()); + } + + @org.junit.Test + public void categoryContent() throws Exception { + String content = spider.categoryContent("2", "2", true, new HashMap<>()); + JsonObject map = Json.safeObject(content); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + System.out.println("categoryContent--" + gson.toJson(map)); + Assert.assertFalse(map.getAsJsonArray("list").isEmpty()); + } + + @org.junit.Test + public void detailContent() throws Exception { + + String content = spider.detailContent(Arrays.asList("124923")); + JsonObject map = Json.safeObject(content); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + System.out.println("detailContent--" + gson.toJson(map)); + Assert.assertFalse(map.getAsJsonArray("list").isEmpty()); + } + + @org.junit.Test + public void playerContent() throws Exception { + String froms = "FF源-勿信视频内广告$$$LZ源-勿信视频内广告$$$官网TX云$$$BF$$$"; + String urls = "第01集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7157_0312029b/index.m3u8#第02集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7159_eb883cc3/index.m3u8#第03集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7163_c290b983/index.m3u8#第04集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7164_2f0e31cb/index.m3u8#第05集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7162_c99dd96f/index.m3u8#第06集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7165_6bce06ca/index.m3u8#第07集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7166_bdaaf8f3/index.m3u8#第08集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7169_378107c9/index.m3u8#第09集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7167_f4cc26c3/index.m3u8#第10集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7168_be8a4b0c/index.m3u8#第11集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7170_2420c90d/index.m3u8#第12集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7172_992e853b/index.m3u8#第13集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7171_5497dbfd/index.m3u8#第14集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7173_eb012483/index.m3u8#第15集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7174_0c865a91/index.m3u8#第16集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7176_fc223996/index.m3u8#第17集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7175_fe8d0d0a/index.m3u8#第18集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7178_1a76223c/index.m3u8#第19集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7179_5f52390d/index.m3u8#第20集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7177_11f268fa/index.m3u8#第21集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7181_cdb88db5/index.m3u8#第22集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7180_b68ee15d/index.m3u8#第23集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7183_66335d2a/index.m3u8#第24集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7182_8d2b0c17/index.m3u8#第25集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7185_d43b8810/index.m3u8#第26集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7187_80c1c117/index.m3u8#第27集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7186_991e0645/index.m3u8#第28集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7184_53a17d67/index.m3u8#第29集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7189_2f833fc7/index.m3u8#第30集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7188_55aa6a1a/index.m3u8#第31集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7195_20463a48/index.m3u8#第32集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7192_1b9638c7/index.m3u8#第33集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7191_c3be051d/index.m3u8#第34集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7190_f1790871/index.m3u8#第35集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7193_4feecdd9/index.m3u8#第36集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7194_ed7852e2/index.m3u8#第37集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7196_1030b485/index.m3u8#第38集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7198_d5bf1b6d/index.m3u8#第39集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7197_8c505ae9/index.m3u8#第40集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7204_f43bbd97/index.m3u8#第41集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7199_6d90609b/index.m3u8#第42集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7202_d2bb1644/index.m3u8#第43集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7200_863e3ee3/index.m3u8#第44集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7201_7d751b72/index.m3u8#第45集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7203_f21b18c8/index.m3u8#第46集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7205_84bd10a9/index.m3u8#第47集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7206_580677f5/index.m3u8#第48集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7208_d7e68bfc/index.m3u8#第49集$http://43.248.129.14:20240/?url=https://vip.ffzy-play.com/20221029/7207_241f728e/index.m3u8#$$$第01集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10879_f1428071/index.m3u8#第02集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10880_f85371e3/index.m3u8#第03集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10881_61f11f73/index.m3u8#第04集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10883_b722048d/index.m3u8#第05集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10882_bbe4483f/index.m3u8#第06集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10884_d5b261da/index.m3u8#第07集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10885_e25f2826/index.m3u8#第08集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10886_4205df18/index.m3u8#第09集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10887_a19974e8/index.m3u8#第10集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10888_2eb076c6/index.m3u8#第11集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10978_5083d953/index.m3u8#第12集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10893_0a1faa57/index.m3u8#第13集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10894_dcfd62c7/index.m3u8#第14集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10895_5dfcc8c7/index.m3u8#第15集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10896_89750caa/index.m3u8#第16集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10897_c37aeeeb/index.m3u8#第17集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10898_f00914e5/index.m3u8#第18集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10899_5ff0ffb9/index.m3u8#第19集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10900_15fd5f8e/index.m3u8#第20集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10901_ebe2ff41/index.m3u8#第21集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10902_0cd65f72/index.m3u8#第22集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10903_3cceee3f/index.m3u8#第23集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10907_fb5d8a1f/index.m3u8#第24集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10980_c79de392/index.m3u8#第25集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10912_b235b60f/index.m3u8#第26集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10913_4d957978/index.m3u8#第27集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10914_01eab996/index.m3u8#第28集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10915_f35a0e6d/index.m3u8#第29集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10916_789c0620/index.m3u8#第30集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10917_267c7203/index.m3u8#第31集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10918_3d37d18c/index.m3u8#第32集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10919_5b2e3e96/index.m3u8#第33集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10920_cbec77ff/index.m3u8#第34集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10921_1515340f/index.m3u8#第35集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10922_7865f15b/index.m3u8#第36集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10923_6a641bb0/index.m3u8#第37集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10924_49b711a6/index.m3u8#第38集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10925_8fb8488e/index.m3u8#第39集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10926_49d53974/index.m3u8#第40集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10927_68b41643/index.m3u8#第41集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10928_d731c97e/index.m3u8#第42集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10929_15cf31f8/index.m3u8#第43集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10930_7ce3864c/index.m3u8#第44集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10931_75ec4941/index.m3u8#第45集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10932_b0094b65/index.m3u8#第46集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10933_5838a8f0/index.m3u8#第47集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10934_cc5adb33/index.m3u8#第48集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10935_66552231/index.m3u8#第49集$http://43.248.129.14:20240/?url=https://vip.lz-cdn.com/20220428/10936_549e53c8/index.m3u8#$$$长歌行_01$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/t0036kis46j.html#长歌行_02$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/d00369b1y7c.html#长歌行_03$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/m0036xvwhhm.html#长歌行_04$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/i0036kfyhhb.html#长歌行_05$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/y0036x4ispp.html#长歌行_06$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/g0036gz0hg1.html#长歌行_07$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/l00362ps2f8.html#长歌行_08$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/b0036i9dvch.html#长歌行_09$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/g0036055isx.html#长歌行_10$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/c0036su1hxn.html#长歌行_11$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/w0036jcp5vh.html#长歌行_12$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/m0036sut988.html#长歌行_13$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/g0036furtm7.html#长歌行_14$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/w00361nzf48.html#长歌行_15$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/c0036zjf2qn.html#长歌行_16$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/r0036eelbmr.html#长歌行_17$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/o0036vmoosx.html#长歌行_18$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/t0036evfkty.html#长歌行_19$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/u0036ybn5x3.html#长歌行_20$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/e0036z1f6lj.html#长歌行_21$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/k00363hxgof.html#长歌行_22$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/v0036plpx51.html#长歌行_23$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/v0036ajs5h6.html#长歌行_24$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/g0036lf9yaq.html#长歌行_25$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/h0036e1eqsn.html#长歌行_26$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/p0036uzz4y1.html#长歌行_27$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/d00369d1rr3.html#长歌行_28$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/y00362seg8v.html#长歌行_29$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/k0036vv55ws.html#长歌行_30$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/p0036yf9swq.html#长歌行_31$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/a0036b01sgr.html#长歌行_32$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/x0036veo6zb.html#长歌行_33$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/i0036xqm59r.html#长歌行_34$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/g00367vk4u9.html#长歌行_35$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/p00369wkhm9.html#长歌行_36$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/g0036d80wbh.html#长歌行_37$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/p0036tk43ac.html#长歌行_38$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/w00365hv98w.html#长歌行_39$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/u0036qwqe6a.html#长歌行_40$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/k00360ym5ee.html#长歌行_41$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/h0036m4ak48.html#长歌行_42$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/d0036f1it5w.html#长歌行_43$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/q00360adsy7.html#长歌行_44$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/p0036aap6fo.html#长歌行_45$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/u0036t18zc5.html#长歌行_46$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/l0036m8a5hq.html#长歌行_47$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/p0036btxb2v.html#长歌行_48$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/c00369xnt6z.html#长歌行_49$https://cache.json.icu/5555.php?url=https://v.qq.com/x/cover/mzc00200c6aodyr/u003668tbq5.html#$$$第01集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第01集/index.m3u8#第02集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第02集/index.m3u8#第03集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第03集/index.m3u8#第04集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第04集/index.m3u8#第05集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第05集/index.m3u8#第06集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第06集/index.m3u8#第07集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第07集/index.m3u8#第08集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第08集/index.m3u8#第09集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第09集/index.m3u8#第10集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第10集/index.m3u8#第11集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第11集/index.m3u8#第12集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第12集/index.m3u8#第13集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第13集/index.m3u8#第14集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第14集/index.m3u8#第15集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第15集/index.m3u8#第16集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第16集/index.m3u8#第17集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第17集/index.m3u8#第18集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第18集/index.m3u8#第19集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第19集/index.m3u8#第20集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第20集/index.m3u8#第21集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第21集/index.m3u8#第22集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第22集/index.m3u8#第23集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第23集/index.m3u8#第24集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第24集/index.m3u8#第25集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第25集/index.m3u8#第26集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第26集/index.m3u8#第27集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第27集/index.m3u8#第28集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第28集/index.m3u8#第29集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第29集/index.m3u8#第30集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第30集/index.m3u8#第31集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第31集/index.m3u8#第32集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第32集/index.m3u8#第33集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第33集/index.m3u8#第34集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第34集/index.m3u8#第35集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第35集/index.m3u8#第36集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第36集/index.m3u8#第37集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第37集/index.m3u8#第38集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第38集/index.m3u8#第39集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第39集/index.m3u8#第40集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第40集/index.m3u8#第41集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第41集/index.m3u8#第42集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第42集/index.m3u8#第43集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第43集/index.m3u8#第44集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第44集/index.m3u8#第45集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf4.com/video/changgexing/第45集/index.m3u8#第46集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf5.com/video/changgexing/第46集/index.m3u8#第47集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第47集/index.m3u8#第48集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第48集/index.m3u8#第49集$http://43.248.129.14:20240/?url=https://c1.rrcdnbf6.com/video/changgexing/第49集/index.m3u8#$$$"; + for (int i = 0; i < urls.split("\\$\\$\\$").length; i++) { + String content = spider.playerContent(froms.split("\\$\\$\\$")[i], urls.split("\\$\\$\\$")[i].split("#")[0].split("\\$")[1], new ArrayList<>()); + JsonObject map = Json.safeObject(content); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + System.out.println("playerContent--" + gson.toJson(map)); + Assert.assertFalse(map.getAsJsonPrimitive("url").getAsString().isEmpty()); + } + } + + @org.junit.Test + public void searchContent() throws Exception { + String content = spider.searchContent("阿凡达", false); + JsonObject map = Json.safeObject(content); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + System.out.println("searchContent--" + gson.toJson(map)); + Assert.assertFalse(map.getAsJsonArray("list").isEmpty()); + } +} \ No newline at end of file diff --git a/app/src/test/java/QxiTvTest.java b/app/src/test/java/QxiTvTest.java index 5f37704c..75562a70 100644 --- a/app/src/test/java/QxiTvTest.java +++ b/app/src/test/java/QxiTvTest.java @@ -55,7 +55,7 @@ public class QxiTvTest { @org.junit.Test public void categoryContent() throws Exception { - String content = spider.categoryContent("1", "2", true, null); + String content = spider.categoryContent("/vodtype/2/", "2", true, null); JsonObject map = Json.safeObject(content); Gson gson = new GsonBuilder().setPrettyPrinting().create(); System.out.println("categoryContent--" + gson.toJson(map)); @@ -65,7 +65,7 @@ public class QxiTvTest { @org.junit.Test public void detailContent() throws Exception { - String content = spider.detailContent(Arrays.asList("index126780.html")); + String content = spider.detailContent(Arrays.asList("/voddetail/867573/")); JsonObject map = Json.safeObject(content); Gson gson = new GsonBuilder().setPrettyPrinting().create(); System.out.println("detailContent--" + gson.toJson(map)); @@ -74,7 +74,7 @@ public class QxiTvTest { @org.junit.Test public void playerContent() throws Exception { - String content = spider.playerContent("", "126780-0-0.html", new ArrayList<>()); + String content = spider.playerContent("甄选蓝光6", "/vodplay/867573-1-1/", new ArrayList<>()); JsonObject map = Json.safeObject(content); Gson gson = new GsonBuilder().setPrettyPrinting().create(); System.out.println("playerContent--" + gson.toJson(map)); diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 5424193f..4e82d821 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index 48ba0695..ef50f507 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -4e701cc52253ca010c293c86c2d6d3e6 +03e3184db97fde66e469c8b92b9c4a97 diff --git a/json/index.json b/json/index.json index 96f0de9c..6969ccf0 100644 --- a/json/index.json +++ b/json/index.json @@ -1,5 +1,5 @@ { - "spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;4e701cc52253ca010c293c86c2d6d3e6", + "spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;03e3184db97fde66e469c8b92b9c4a97", "lives": [ { "name": "直播ipv6", @@ -110,6 +110,14 @@ "searchable": 0, "filterable": 1 }, + { + "key": "甲子", + "name": "甲子", + "type": 3, + "api": "csp_AppYsV2", + "searchable": 1, + "ext": "http://211.101.237.197:6532/api.php/app/" + }, { "key": "JustLive", "name": "\uD83D\uDCFA\uFE0F JustLive | 直播", @@ -162,11 +170,12 @@ }, { "key": "QxiTv", - "name": "\uD83E\uDD70 7喜 | 影视(不稳定)", + "name": "七喜 | 影视", "type": 3, "api": "csp_QxiTv", "searchable": 1, - "filterable": 1 + "changeable": 0, + "ext": {} } ], "parses": [ diff --git a/json/index1.json b/json/index1.json index a10b5f18..3107ac8a 100644 --- a/json/index1.json +++ b/json/index1.json @@ -1,5 +1,5 @@ { - "spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;4e701cc52253ca010c293c86c2d6d3e6", + "spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;03e3184db97fde66e469c8b92b9c4a97", "lives": [ { "name": "直播ipv6",