pull/737/head
gedoor 5 years ago
parent 66126d77a3
commit 48bcb67aaa
  1. 7
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt

@ -10,6 +10,7 @@ import io.legado.app.help.CacheManager
import io.legado.app.help.JsExtensions import io.legado.app.help.JsExtensions
import io.legado.app.help.http.CookieStore import io.legado.app.help.http.CookieStore
import io.legado.app.utils.* import io.legado.app.utils.*
import kotlinx.coroutines.runBlocking
import org.jsoup.nodes.Entities import org.jsoup.nodes.Entities
import org.mozilla.javascript.NativeObject import org.mozilla.javascript.NativeObject
import java.net.URL import java.net.URL
@ -645,9 +646,9 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions {
override fun ajax(urlStr: String): String? { override fun ajax(urlStr: String): String? {
return try { return try {
val analyzeUrl = AnalyzeUrl(urlStr, book = book) val analyzeUrl = AnalyzeUrl(urlStr, book = book)
val call = analyzeUrl.getResponse(urlStr) runBlocking {
val response = call.execute() analyzeUrl.getRes(urlStr).body
response.body() }
} catch (e: Exception) { } catch (e: Exception) {
e.localizedMessage e.localizedMessage
} }

Loading…
Cancel
Save