feature: Support XPath2.0 to 3.1 (#1774)

This commit is contained in:
Constantin Hong
2023-11-14 00:42:21 +09:00
committed by GitHub
parent 5229094e44
commit 26931e0167
10 changed files with 541 additions and 21 deletions

View File

@@ -173,6 +173,11 @@ class perform_site_check(difference_detection_processor):
html_content=self.fetcher.content,
append_pretty_line_formatting=not watch.is_source_type_url,
is_rss=is_rss)
elif filter_rule.startswith('xpath1:'):
html_content += html_tools.xpath1_filter(xpath_filter=filter_rule.replace('xpath1:', ''),
html_content=fetcher.content,
append_pretty_line_formatting=not is_source,
is_rss=is_rss)
else:
# CSS Filter, extract the HTML that matches and feed that into the existing inscriptis::get_text
html_content += html_tools.include_filters(include_filters=filter_rule,