Skip to content

Commit

Permalink
Merge pull request gedoor#489 from Celeter/master
Browse files Browse the repository at this point in the history
allinone正则去标签
  • Loading branch information
gedoor authored Apr 12, 2020
2 parents fbc1f61 + 215ce88 commit efa8ddf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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, "┌获取目录网址");
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/java/com/kunfei/bookshelf/model/content/BookList.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"), // 保存简介
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ 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);
}

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);
Expand Down

0 comments on commit efa8ddf

Please sign in to comment.