From b5e19564dcbf1b7ec12946209d74313479f9dfe1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 24 十二月 2021 19:51:31 +0800 Subject: [PATCH] 布丸vivo上架兼容 --- src/main/java/com/yeshi/buwan/videos/hanmi/HanmiApiUtil.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/yeshi/buwan/videos/hanmi/HanmiApiUtil.java b/src/main/java/com/yeshi/buwan/videos/hanmi/HanmiApiUtil.java index 90fe0b1..8b10ee6 100644 --- a/src/main/java/com/yeshi/buwan/videos/hanmi/HanmiApiUtil.java +++ b/src/main/java/com/yeshi/buwan/videos/hanmi/HanmiApiUtil.java @@ -141,7 +141,7 @@ indexOf("(") : infos.get("棣栨挱"). length())); - if (infos.get("涓婃槧鏃ユ湡") != null) + if (infos.get("涓婃槧鏃ユ湡") != null) { show.setRelaseDate(infos.get("涓婃槧鏃ユ湡"). substring(0, infos.get("涓婃槧鏃ユ湡"). @@ -151,6 +151,7 @@ indexOf("(") : infos.get("涓婃槧鏃ユ湡"). length())); + } if (year == null && show.getRelaseDate() != null) { @@ -159,6 +160,10 @@ show.setYear(year.replace("(", ""). replace(")", "")); + + if (show.getYear() != null && show.getRelaseDate() == null) { + show.setRelaseDate(show.getYear() + "-01-01"); + } show.setId(show.getUrl(). @@ -250,6 +255,9 @@ List<HanmiShow> list = new ArrayList<>(); for (HanmiShow show : showList) { try { + if (!show.getUrl().startsWith("http")) { + show.setUrl("https://www.hmtv.me" + show.getUrl()); + } list.add(parseShowDetail(show)); } catch (Exception e) { e.printStackTrace(); -- Gitblit v1.8.0