From bf5c2c7b0055bc25fc37a033504d2698c3a5d7f8 Mon Sep 17 00:00:00 2001 From: Constantin Hong Date: Fri, 3 May 2024 02:16:22 +0900 Subject: [PATCH] html_tools/fix: --- changedetectionio/html_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/html_tools.py b/changedetectionio/html_tools.py index 96ffbec9..a3ca75f5 100644 --- a/changedetectionio/html_tools.py +++ b/changedetectionio/html_tools.py @@ -144,7 +144,7 @@ def xpath_filter(xpath_filter, html_content, append_pretty_line_formatting=False tree = forest_transplanting(tree) 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 CDATA.. if type(r) != list: