|
|
|
@ -99,7 +99,11 @@ object BookList { |
|
|
|
|
return bookList |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun getInfoItem(analyzeRule: AnalyzeRule, bookSource: BookSource, baseUrl: String): SearchBook? { |
|
|
|
|
private fun getInfoItem( |
|
|
|
|
analyzeRule: AnalyzeRule, |
|
|
|
|
bookSource: BookSource, |
|
|
|
|
baseUrl: String |
|
|
|
|
): SearchBook? { |
|
|
|
|
val searchBook = SearchBook() |
|
|
|
|
searchBook.bookUrl = baseUrl |
|
|
|
|
searchBook.origin = bookSource.bookSourceUrl |
|
|
|
@ -125,8 +129,10 @@ object BookList { |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.kind ?: "") |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取简介") |
|
|
|
|
searchBook.intro = analyzeRule.getString(intro ?: "") |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.intro |
|
|
|
|
?: "", isHtml = true) |
|
|
|
|
SourceDebug.printLog( |
|
|
|
|
bookSource.bookSourceUrl, 1, searchBook.intro |
|
|
|
|
?: "", isHtml = true |
|
|
|
|
) |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取字数") |
|
|
|
|
searchBook.wordCount = analyzeRule.getString(wordCount ?: "") |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.wordCount ?: "") |
|
|
|
@ -135,8 +141,10 @@ object BookList { |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.coverUrl ?: "") |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取最新章节") |
|
|
|
|
searchBook.latestChapterTitle = analyzeRule.getString(lastChapter ?: "") |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.latestChapterTitle |
|
|
|
|
?: "") |
|
|
|
|
SourceDebug.printLog( |
|
|
|
|
bookSource.bookSourceUrl, 1, searchBook.latestChapterTitle |
|
|
|
|
?: "" |
|
|
|
|
) |
|
|
|
|
return searchBook |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -179,8 +187,10 @@ object BookList { |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.kind ?: "", printLog) |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取简介", printLog) |
|
|
|
|
searchBook.intro = analyzeRule.getString(ruleIntro) |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.intro |
|
|
|
|
?: "", printLog, true) |
|
|
|
|
SourceDebug.printLog( |
|
|
|
|
bookSource.bookSourceUrl, 1, searchBook.intro |
|
|
|
|
?: "", printLog, true |
|
|
|
|
) |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取字数", printLog) |
|
|
|
|
searchBook.wordCount = analyzeRule.getString(ruleWordCount) |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.wordCount ?: "", printLog) |
|
|
|
@ -189,8 +199,10 @@ object BookList { |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.coverUrl ?: "", printLog) |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取最新章节", printLog) |
|
|
|
|
searchBook.latestChapterTitle = analyzeRule.getString(ruleLastChapter) |
|
|
|
|
SourceDebug.printLog(bookSource.bookSourceUrl, 1, searchBook.latestChapterTitle |
|
|
|
|
?: "", printLog) |
|
|
|
|
SourceDebug.printLog( |
|
|
|
|
bookSource.bookSourceUrl, 1, searchBook.latestChapterTitle |
|
|
|
|
?: "", printLog |
|
|
|
|
) |
|
|
|
|
return searchBook |
|
|
|
|
} |
|
|
|
|
return null |
|
|
|
|