|
|
|
@ -56,9 +56,7 @@ object Debug { |
|
|
|
|
log(debugSource, "︾开始解析") |
|
|
|
|
Rss.getArticles(rssSource, null) |
|
|
|
|
.onSuccess { |
|
|
|
|
if (it == null) { |
|
|
|
|
log(debugSource, "︽解析失败", state = -1) |
|
|
|
|
} else if(it.articles.isEmpty()) { |
|
|
|
|
if (it.articles.isEmpty()) { |
|
|
|
|
log(debugSource, "⇒列表页解析成功,为空") |
|
|
|
|
log(debugSource, "︽解析完成", state = 1000) |
|
|
|
|
} else { |
|
|
|
@ -140,7 +138,6 @@ object Debug { |
|
|
|
|
log(debugSource, "︾开始解析发现页") |
|
|
|
|
val explore = webBook.exploreBook(url, 1) |
|
|
|
|
.onSuccess { exploreBooks -> |
|
|
|
|
exploreBooks?.let { |
|
|
|
|
if (exploreBooks.isNotEmpty()) { |
|
|
|
|
log(debugSource, "︽发现页解析完成") |
|
|
|
|
log(debugSource, showTime = false) |
|
|
|
@ -149,7 +146,6 @@ object Debug { |
|
|
|
|
log(debugSource, "︽未获取到书籍", state = -1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.onError { |
|
|
|
|
log( |
|
|
|
|
debugSource, |
|
|
|
@ -164,7 +160,6 @@ object Debug { |
|
|
|
|
log(debugSource, "︾开始解析搜索页") |
|
|
|
|
val search = webBook.searchBook(key, 1) |
|
|
|
|
.onSuccess { searchBooks -> |
|
|
|
|
searchBooks?.let { |
|
|
|
|
if (searchBooks.isNotEmpty()) { |
|
|
|
|
log(debugSource, "︽搜索页解析完成") |
|
|
|
|
log(debugSource, showTime = false) |
|
|
|
@ -173,7 +168,6 @@ object Debug { |
|
|
|
|
log(debugSource, "︽未获取到书籍", state = -1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.onError { |
|
|
|
|
log(debugSource, it.localizedMessage, state = -1) |
|
|
|
|
} |
|
|
|
@ -197,8 +191,7 @@ object Debug { |
|
|
|
|
private fun tocDebug(webBook: WebBook, book: Book) { |
|
|
|
|
log(debugSource, "︾开始解析目录页") |
|
|
|
|
val chapterList = webBook.getChapterList(book) |
|
|
|
|
.onSuccess { chapterList -> |
|
|
|
|
chapterList?.let { |
|
|
|
|
.onSuccess { |
|
|
|
|
if (it.isNotEmpty()) { |
|
|
|
|
log(debugSource, "︽目录页解析完成") |
|
|
|
|
log(debugSource, showTime = false) |
|
|
|
@ -208,7 +201,6 @@ object Debug { |
|
|
|
|
log(debugSource, "︽目录列表为空", state = -1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.onError { |
|
|
|
|
log(debugSource, it.localizedMessage, state = -1) |
|
|
|
|
} |
|
|
|
|