|
|
|
@ -359,8 +359,7 @@ class AnalyzeByJSoup { |
|
|
|
|
try { |
|
|
|
|
when (lastRule) { |
|
|
|
|
"text" -> for (element in elements) { |
|
|
|
|
val text = element.text() |
|
|
|
|
textS.add(text) |
|
|
|
|
textS.add(element.text()) |
|
|
|
|
} |
|
|
|
|
"textNodes" -> for (element in elements) { |
|
|
|
|
val tn = arrayListOf<String>() |
|
|
|
@ -373,12 +372,15 @@ class AnalyzeByJSoup { |
|
|
|
|
} |
|
|
|
|
textS.add(join("\n", tn)) |
|
|
|
|
} |
|
|
|
|
"ownText", "html" -> { |
|
|
|
|
elements.select("script").remove() |
|
|
|
|
"ownText" -> for (element in elements) { |
|
|
|
|
textS.add(element.ownText()) |
|
|
|
|
} |
|
|
|
|
"html" -> { |
|
|
|
|
elements.select("script, style").remove() |
|
|
|
|
val html = elements.html() |
|
|
|
|
textS.add(html) |
|
|
|
|
} |
|
|
|
|
"all" -> textS.add(elements.html()) |
|
|
|
|
"all" -> textS.add(elements.outerHtml()) |
|
|
|
|
else -> for (element in elements) { |
|
|
|
|
val url = element.attr(lastRule) |
|
|
|
|
if (!isEmpty(url) && !textS.contains(url)) { |
|
|
|
|