diff --git a/app/src/main/java/com/kunfei/bookshelf/model/analyzeRule/AnalyzeByRegex.java b/app/src/main/java/com/kunfei/bookshelf/model/analyzeRule/AnalyzeByRegex.java index fe7e435e82..8ea9a94435 100644 --- a/app/src/main/java/com/kunfei/bookshelf/model/analyzeRule/AnalyzeByRegex.java +++ b/app/src/main/java/com/kunfei/bookshelf/model/analyzeRule/AnalyzeByRegex.java @@ -104,7 +104,7 @@ public static void getInfoOfRegex(String res, String[] regs, int index, Debug.printLog(tag, "┌获取最新章节"); Debug.printLog(tag, "└" + bookShelfBean.getLastChapterName()); Debug.printLog(tag, "┌获取简介内容"); - Debug.printLog(tag, "└" + bookInfoBean.getIntroduce()); + Debug.printLog(tag, 1, "└" + bookInfoBean.getIntroduce(), true, true); Debug.printLog(tag, "┌获取封面网址"); Debug.printLog(tag, "└" + bookInfoBean.getCoverUrl()); Debug.printLog(tag, "┌获取目录网址"); diff --git a/app/src/main/java/com/kunfei/bookshelf/model/content/BookList.java b/app/src/main/java/com/kunfei/bookshelf/model/content/BookList.java index d693a0991b..bca9fe02b5 100644 --- a/app/src/main/java/com/kunfei/bookshelf/model/content/BookList.java +++ b/app/src/main/java/com/kunfei/bookshelf/model/content/BookList.java @@ -211,18 +211,18 @@ private SearchBookBean getItem(AnalyzeRule analyzer, String baseUrl) throws Exce Debug.printLog(tag, "┌获取作者"); item.setAuthor(StringUtils.formatHtml(analyzer.getString(bookSourceBean.getRuleBookAuthor()))); Debug.printLog(tag, "└" + item.getAuthor()); - Debug.printLog(tag, "┌获取封面"); - item.setCoverUrl(analyzer.getString(bookSourceBean.getRuleCoverUrl(), true)); - Debug.printLog(tag, "└" + item.getCoverUrl()); Debug.printLog(tag, "┌获取分类"); item.setKind(analyzer.getString(bookSourceBean.getRuleBookKind())); Debug.printLog(tag, 111, "└" + item.getKind()); Debug.printLog(tag, "┌获取最新章节"); item.setLastChapter(analyzer.getString(bookSourceBean.getRuleBookLastChapter())); - Debug.printLog(tag, "└最新章节:" + item.getLastChapter()); + Debug.printLog(tag, "└" + item.getLastChapter()); Debug.printLog(tag, "┌获取简介"); item.setIntroduce(analyzer.getString(bookSourceBean.getRuleIntroduce())); Debug.printLog(tag, 1, "└" + item.getIntroduce(), true, true); + Debug.printLog(tag, "┌获取封面"); + item.setCoverUrl(analyzer.getString(bookSourceBean.getRuleCoverUrl(), true)); + Debug.printLog(tag, "└" + item.getCoverUrl()); return item; } return null; @@ -363,8 +363,8 @@ private void getBooksOfRegex(String res, String[] regs, } // 保存当前节点的书籍信息 item.setSearchInfo( - ruleVal.get("ruleName"), // 保存书名 - ruleVal.get("ruleAuthor"), // 保存作者 + StringUtils.formatHtml(ruleVal.get("ruleName")), // 保存书名 + StringUtils.formatHtml(ruleVal.get("ruleAuthor")), // 保存作者 ruleVal.get("ruleKind"), // 保存分类 ruleVal.get("ruleLastChapter"), // 保存终章 ruleVal.get("ruleIntroduce"), // 保存简介 @@ -381,19 +381,19 @@ private void getBooksOfRegex(String res, String[] regs, } while (resM.find()); // 输出调试信息 Debug.printLog(tag, "└找到 " + books.size() + " 个匹配的结果"); - Debug.printLog(tag, "┌获取书籍名称"); + Debug.printLog(tag, "┌获取书名"); Debug.printLog(tag, "└" + books.get(0).getName()); - Debug.printLog(tag, "┌获取作者名称"); + Debug.printLog(tag, "┌获取作者"); Debug.printLog(tag, "└" + books.get(0).getAuthor()); - Debug.printLog(tag, "┌获取分类信息"); + Debug.printLog(tag, "┌获取分类"); Debug.printLog(tag, 111, "└" + books.get(0).getKind()); Debug.printLog(tag, "┌获取最新章节"); Debug.printLog(tag, "└" + books.get(0).getLastChapter()); - Debug.printLog(tag, "┌获取简介内容"); + Debug.printLog(tag, "┌获取简介"); Debug.printLog(tag, 1, "└" + books.get(0).getIntroduce(), true, true); - Debug.printLog(tag, "┌获取封面网址"); + Debug.printLog(tag, "┌获取封面"); Debug.printLog(tag, "└" + books.get(0).getCoverUrl()); - Debug.printLog(tag, "┌获取书籍网址"); + Debug.printLog(tag, "┌获取书籍"); Debug.printLog(tag, "└" + books.get(0).getNoteUrl()); } else { StringBuilder result = new StringBuilder(); diff --git a/app/src/main/java/com/kunfei/bookshelf/model/content/Debug.java b/app/src/main/java/com/kunfei/bookshelf/model/content/Debug.java index eec2146466..e8a474a5c5 100644 --- a/app/src/main/java/com/kunfei/bookshelf/model/content/Debug.java +++ b/app/src/main/java/com/kunfei/bookshelf/model/content/Debug.java @@ -43,7 +43,7 @@ public static void printLog(String tag, String msg) { printLog(tag, 1, msg, true); } - public static void printLog(String tag, int state, String msg) { + static void printLog(String tag, int state, String msg) { printLog(tag, state, msg, true); } @@ -51,7 +51,7 @@ static void printLog(String tag, int state, String msg, boolean print) { printLog(tag, state, msg, print, false); } - static void printLog(String tag, int state, String msg, boolean print, boolean formatHtml) { + public static void printLog(String tag, int state, String msg, boolean print, boolean formatHtml) { if (print && Objects.equals(SOURCE_DEBUG_TAG, tag)) { if (formatHtml) { msg = StringUtils.formatHtml(msg);