|
|
@ -44,10 +44,17 @@ class BookList { |
|
|
|
private fun getItem(analyzeRule: AnalyzeRule, bookSource: BookSource): SearchBook? { |
|
|
|
private fun getItem(analyzeRule: AnalyzeRule, bookSource: BookSource): SearchBook? { |
|
|
|
val searchBook = SearchBook() |
|
|
|
val searchBook = SearchBook() |
|
|
|
analyzeRule.setBook(searchBook) |
|
|
|
analyzeRule.setBook(searchBook) |
|
|
|
bookSource.getBookInfoRule().init?.let { |
|
|
|
with(bookSource.getBookInfoRule()) { |
|
|
|
analyzeRule.setContent(analyzeRule.getElement(it)) |
|
|
|
init?.let { |
|
|
|
|
|
|
|
analyzeRule.setContent(analyzeRule.getElement(it)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
searchBook.name = analyzeRule.getString(name ?: "") |
|
|
|
|
|
|
|
if (!searchBook.name.isNullOrEmpty()) { |
|
|
|
|
|
|
|
searchBook.author = analyzeRule.getString(author ?: "") |
|
|
|
|
|
|
|
searchBook.coverUrl = analyzeRule.getString(coverUrl ?: "") |
|
|
|
|
|
|
|
return searchBook |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return null |
|
|
|
return null |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |