Revert "html_tools/feat: Add parameter fragment explicitly into elementpath.select"

This reverts commit 1747225c67.
pull/2175/head
Constantin Hong 3 months ago
parent 1747225c67
commit cb06cef463

@ -125,12 +125,7 @@ def xpath_filter(xpath_filter, html_content, append_pretty_line_formatting=False
tree = html.fromstring(bytes(html_content, encoding='utf-8'), parser=parser)
html_block = ""
# https://github.com/sissaschool/elementpath/issues/71
r = elementpath.select(tree,
xpath_filter.strip(),
namespaces={'re': 'http://exslt.org/regular-expressions'},
fragment=False,
parser=XPath3Parser)
r = elementpath.select(tree, xpath_filter.strip(), namespaces={'re': 'http://exslt.org/regular-expressions'}, parser=XPath3Parser)
#@note: //title/text() wont work where <title>CDATA..
if type(r) != list:

Loading…
Cancel
Save