zhegexiaohuozi/JsoupXpath

`text()`重构后文本比对逻辑没有同步更新导致的。2.4.3已修复。JsoupXpath表现行为和Xpath1.0标准语法以及Chrome的实现保持一致。Chrome的实现可以通过 `$x("//*[text()='总字数']//text()")`来验证。JsoupXpath的test如下:

gedoor opened this issue · 3 comments

还是报错
W/System.err: java.lang.NoSuchMethodError: No direct method (Lorg/jsoup/select/NodeVisitor;)V in class Lorg/jsoup/select/NodeTraversor; or its super classes (declaration of 'org.jsoup.select.NodeTraversor' appears in /data/app/~~s7_CEtBTLvnrVyLXmyMu3g==/io.legado.app.debug-Fr4yRYoACSlWuprA164Txg==/base.apk!classes3.dex)
at org.seimicrawler.xpath.core.node.Text.call(Text.java:54)
W/System.err: at org.seimicrawler.xpath.core.XpathProcessor.visitNodeTest(XpathProcessor.java:220)
at org.seimicrawler.xpath.core.XpathProcessor.visitNodeTest(XpathProcessor.java:31)
at org.seimicrawler.xpath.antlr.XpathParser$NodeTestContext.accept(XpathParser.java:558)
W/System.err: at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.seimicrawler.xpath.core.XpathProcessor.visitStep(XpathProcessor.java:102)
W/System.err: at org.seimicrawler.xpath.core.XpathProcessor.visitStep(XpathProcessor.java:31)
at org.seimicrawler.xpath.antlr.XpathParser$StepContext.accept(XpathParser.java:404)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
W/System.err: at org.seimicrawler.xpath.core.XpathProcessor.visitRelativeLocationPath(XpathProcessor.java:68)
at org.seimicrawler.xpath.core.XpathProcessor.visitRelativeLocationPath(XpathProcessor.java:31)

这应该是你自己项目中包冲突了,排下包吧。另外,在同一个issue中讨论即可。

嗯,用的版本不一样,我jsoup用到最新版本

这应该是你自己项目中包冲突了,排下包吧。另外,在同一个issue中讨论即可。

你这个库能升级一下jsoup版本吗,最新版本都1.13.1了