diff --git a/app/src/main/java/com/github/catvod/spider/Dy555.java b/app/src/main/java/com/github/catvod/spider/Dy555.java index 152e2846..48b1c1a8 100644 --- a/app/src/main/java/com/github/catvod/spider/Dy555.java +++ b/app/src/main/java/com/github/catvod/spider/Dy555.java @@ -53,6 +53,7 @@ public class Dy555 extends Spider { protected JSONObject filterConfig; protected Pattern regexCategory = Pattern.compile("/vodtype/(\\d+).html"); + protected Pattern regexCategoryDouban = Pattern.compile("豆瓣:(\\S+)"); protected Pattern regexVoddetail = Pattern.compile("/voddetail/(\\d+).html"); protected Pattern regexPlay = Pattern.compile("/vodplay/(\\S+).html"); protected Pattern regexPage = Pattern.compile("\\d+/(\\d+)"); @@ -132,7 +133,10 @@ public class Dy555 extends Spider { String title = vod.attr("title"); String cover = vod.selectFirst("img").attr("data-original"); String remark = vod.selectFirst("div.module-item-note").text(); - remark = vod.selectFirst("div.module-item-douban").text() + " " + remark; + Matcher matcherDouBan = regexCategoryDouban.matcher(vod.selectFirst("div.module-item-douban").text()); + if (matcherDouBan.find()) { + remark = matcherDouBan.group(1) + " " + remark; + } Matcher matcher = regexVoddetail.matcher(vod.attr("href")); if (!matcher.find()) continue; @@ -213,7 +217,10 @@ public class Dy555 extends Spider { String title = vod.attr("title"); String cover = vod.selectFirst("img").attr("data-original"); String remark = vod.selectFirst("div.module-item-note").text(); - remark = vod.selectFirst("div.module-item-douban").text() + " " + remark; + Matcher matcherDouBan = regexCategoryDouban.matcher(vod.selectFirst("div.module-item-douban").text()); + if (matcherDouBan.find()) { + remark = matcherDouBan.group(1) + " " + remark; + } Matcher matcher = regexVoddetail.matcher(vod.attr("href")); if (matcher.find()) { String vodId = matcher.group(1); diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 69e591fa..848a9b8d 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 3282c6fe..9cd4d199 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -20bc02ea99492835f495a8482c57b9a3 +a36f3ed40973e12b6431dcd15c485935