|
|
@ -61,21 +61,25 @@ class SourceDebug(private val webBook: WebBook, callback: Callback) { |
|
|
|
fun startDebug(key: String) { |
|
|
|
fun startDebug(key: String) { |
|
|
|
cancelDebug() |
|
|
|
cancelDebug() |
|
|
|
startTime = System.currentTimeMillis() |
|
|
|
startTime = System.currentTimeMillis() |
|
|
|
if (key.isAbsUrl()) { |
|
|
|
when { |
|
|
|
|
|
|
|
key.isAbsUrl() -> { |
|
|
|
val book = Book() |
|
|
|
val book = Book() |
|
|
|
book.origin = webBook.sourceUrl |
|
|
|
book.origin = webBook.sourceUrl |
|
|
|
book.bookUrl = key |
|
|
|
book.bookUrl = key |
|
|
|
printLog(webBook.sourceUrl, "⇒开始访问详情页:$key") |
|
|
|
printLog(webBook.sourceUrl, "⇒开始访问详情页:$key") |
|
|
|
infoDebug(book) |
|
|
|
infoDebug(book) |
|
|
|
} else if (key.contains("::")) { |
|
|
|
} |
|
|
|
|
|
|
|
key.contains("::") -> { |
|
|
|
val url = key.substring(key.indexOf("::") + 2) |
|
|
|
val url = key.substring(key.indexOf("::") + 2) |
|
|
|
printLog(webBook.sourceUrl, "⇒开始访问发现页:$url") |
|
|
|
printLog(webBook.sourceUrl, "⇒开始访问发现页:$url") |
|
|
|
exploreDebug(url) |
|
|
|
exploreDebug(url) |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
else -> { |
|
|
|
printLog(webBook.sourceUrl, "⇒开始搜索关键字:$key") |
|
|
|
printLog(webBook.sourceUrl, "⇒开始搜索关键字:$key") |
|
|
|
searchDebug(key) |
|
|
|
searchDebug(key) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun exploreDebug(url: String) { |
|
|
|
private fun exploreDebug(url: String) { |
|
|
|
printLog(debugSource, "︾开始解析发现页") |
|
|
|
printLog(debugSource, "︾开始解析发现页") |
|
|
|