Open adbar opened 1 year ago
In core.py the XPath expression is unnecessarily wide:
core.py
ptest = subtree.xpath(//p//text())
In this part, it is marked as //p//text() so It's looking for the root's p-tag rather than the subtree's p-tag.
//p//text()
.//p//text() would be the right approach.
.//p//text()
Originally posted by @jake-yi in https://github.com/adbar/trafilatura/discussions/287
It changes the extraction parameters so the thresholds below have to be revised.
In
core.py
the XPath expression is unnecessarily wide:ptest = subtree.xpath(//p//text())
In this part, it is marked as
//p//text()
so It's looking for the root's p-tag rather than the subtree's p-tag..//p//text()
would be the right approach.Originally posted by @jake-yi in https://github.com/adbar/trafilatura/discussions/287