From fa907ae5eb3a41397070d2029f92e67619f96bf3 Mon Sep 17 00:00:00 2001 From: Haleydu <924323178@qq.com> Date: Thu, 25 Feb 2021 15:43:10 +0800 Subject: [PATCH] fix CopyMH, closed #207 --- .../main/java/com/hiroshi/cimoc/source/CopyMH.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/hiroshi/cimoc/source/CopyMH.java b/app/src/main/java/com/hiroshi/cimoc/source/CopyMH.java index 7dc59e7a..651ef816 100644 --- a/app/src/main/java/com/hiroshi/cimoc/source/CopyMH.java +++ b/app/src/main/java/com/hiroshi/cimoc/source/CopyMH.java @@ -2,10 +2,7 @@ import android.util.Base64; -import androidx.arch.core.util.Function; - import com.facebook.common.util.Hex; -import com.google.common.base.Functions; import com.google.common.collect.Lists; import com.hiroshi.cimoc.App; import com.hiroshi.cimoc.model.Chapter; @@ -211,7 +208,14 @@ public Request getCheckRequest(String cid) { @Override public String parseCheck(String html) { - return new Node(html).text("div.col-9.comicParticulars-title-right > ul > li:nth-child(5) > span.comicParticulars-right-txt"); + try { + JSONObject comicInfo = new JSONObject(html).getJSONObject("results"); + JSONObject body = comicInfo.getJSONObject("comic"); + return body.getString("datetime_updated"); + } catch (JSONException e) { + e.printStackTrace(); + } + return ""; } @Override