html_tools/fix:

pull/2351/head
Constantin Hong 8 months ago
parent 1f776ff8f6
commit bf5c2c7b00

@ -144,7 +144,7 @@ def xpath_filter(xpath_filter, html_content, append_pretty_line_formatting=False
tree = forest_transplanting(tree) tree = forest_transplanting(tree)
html_block = "" html_block = ""
r = elementpath.select(tree, xpath_filter.strip(), namespaces={'re': 'http://exslt.org/regular-expressions'}, parser=XPath3Parser, fragment=True) r = elementpath.select(tree, xpath_filter.strip(), namespaces={'re': 'http://exslt.org/regular-expressions'}, parser=XPath3Parser, fragment=True, item=tree[0])
#@note: //title/text() wont work where <title>CDATA.. #@note: //title/text() wont work where <title>CDATA..
if type(r) != list: if type(r) != list:

Loading…
Cancel
Save