This commit is contained in:
dukun 2023-02-07 13:31:24 +08:00
parent dca75a316b
commit 57764dbf21
3 changed files with 10 additions and 3 deletions

View File

@ -53,6 +53,7 @@ public class Dy555 extends Spider {
protected JSONObject filterConfig; protected JSONObject filterConfig;
protected Pattern regexCategory = Pattern.compile("/vodtype/(\\d+).html"); protected Pattern regexCategory = Pattern.compile("/vodtype/(\\d+).html");
protected Pattern regexCategoryDouban = Pattern.compile("豆瓣:(\\S+)");
protected Pattern regexVoddetail = Pattern.compile("/voddetail/(\\d+).html"); protected Pattern regexVoddetail = Pattern.compile("/voddetail/(\\d+).html");
protected Pattern regexPlay = Pattern.compile("/vodplay/(\\S+).html"); protected Pattern regexPlay = Pattern.compile("/vodplay/(\\S+).html");
protected Pattern regexPage = Pattern.compile("\\d+/(\\d+)"); protected Pattern regexPage = Pattern.compile("\\d+/(\\d+)");
@ -132,7 +133,10 @@ public class Dy555 extends Spider {
String title = vod.attr("title"); String title = vod.attr("title");
String cover = vod.selectFirst("img").attr("data-original"); String cover = vod.selectFirst("img").attr("data-original");
String remark = vod.selectFirst("div.module-item-note").text(); 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")); Matcher matcher = regexVoddetail.matcher(vod.attr("href"));
if (!matcher.find()) if (!matcher.find())
continue; continue;
@ -213,7 +217,10 @@ public class Dy555 extends Spider {
String title = vod.attr("title"); String title = vod.attr("title");
String cover = vod.selectFirst("img").attr("data-original"); String cover = vod.selectFirst("img").attr("data-original");
String remark = vod.selectFirst("div.module-item-note").text(); 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")); Matcher matcher = regexVoddetail.matcher(vod.attr("href"));
if (matcher.find()) { if (matcher.find()) {
String vodId = matcher.group(1); String vodId = matcher.group(1);

Binary file not shown.

View File

@ -1 +1 @@
20bc02ea99492835f495a8482c57b9a3 a36f3ed40973e12b6431dcd15c485935