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