pull/34/head
kunfei 5 years ago
parent 1f02e47a59
commit de8fb74b8d
  1. 10
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSoup.kt

@ -20,16 +20,16 @@ class AnalyzeByJSoup {
private var element: Element? = null private var element: Element? = null
fun parse(doc: Any): AnalyzeByJSoup { fun parse(doc: Any): AnalyzeByJSoup {
if (doc is Element) { element = if (doc is Element) {
element = doc doc
} else if (doc is JXNode) { } else if (doc is JXNode) {
if (doc.isElement) { if (doc.isElement) {
element = doc.asElement() doc.asElement()
} else { } else {
element = Jsoup.parse(doc.value().toString()) Jsoup.parse(doc.value().toString())
} }
} else { } else {
element = Jsoup.parse(doc.toString()) Jsoup.parse(doc.toString())
} }
return this return this
} }

Loading…
Cancel
Save