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