diff --git a/app/src/main/java/com/github/catvod/spider/PanSou.java b/app/src/main/java/com/github/catvod/spider/PanSou.java index 587931c3..5e21b7af 100644 --- a/app/src/main/java/com/github/catvod/spider/PanSou.java +++ b/app/src/main/java/com/github/catvod/spider/PanSou.java @@ -49,25 +49,22 @@ public class PanSou extends Ali { } @Override - public String searchContent(String key, boolean quick) { - Map types = new HashMap<>(); - types.put("7", "資料夾"); - types.put("1", "影片"); + public String searchContent(String key, boolean quick) throws Exception { + return searchContent(key, "1"); + } + + @Override + public String searchContent(String key, boolean quick, String pg) throws Exception { + return searchContent(key, pg); + } + + private String searchContent(String key, String pg) { + String url = siteUrl + "/search?k=" + URLEncoder.encode(key) + "&page=" + pg + "&s=0&t=-1"; + Elements items = Jsoup.parse(OkHttp.string(url)).select("van-row > a"); List list = new ArrayList<>(); - for (Map.Entry entry : types.entrySet()) { - String typeId = entry.getKey(); - String typeName = entry.getValue(); - String url = siteUrl + "/search?k=" + URLEncoder.encode(key) + "&t=" + typeId; - Elements items = Jsoup.parse(OkHttp.string(url)).select("van-row > a"); - for (Element item : items) { - String title = item.selectFirst("template").text().trim(); - if (!title.contains(key)) continue; - Vod vod = new Vod(); - vod.setVodId(item.attr("href")); - vod.setVodName("[" + typeName + "] " + title); - vod.setVodPic("https://inews.gtimg.com/newsapp_bt/0/13263837859/1000"); - list.add(vod); - } + for (Element item : items) { + String title = item.selectFirst("template").text().trim(); + if (title.contains(key)) list.add(new Vod(item.attr("href"), title, "https://inews.gtimg.com/newsapp_bt/0/13263837859/1000")); } return Result.string(list); } diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index f86d1346..82977618 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 8d572192..84469942 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -c180867252ce20f2d59e5a7e6d4fd92a +20778c40c4dcb8675aa6a67e3faca620