Adds support for jq JSON path querying engine (#1001)

This commit is contained in:
Yusef Ouda
2022-10-09 09:12:45 -05:00
committed by GitHub
parent cd467df97a
commit dfa7fc3a81
8 changed files with 140 additions and 35 deletions

View File

@@ -141,8 +141,9 @@ class perform_site_check():
has_filter_rule = True
if has_filter_rule:
if 'json:' in css_filter_rule:
stripped_text_from_html = html_tools.extract_json_as_string(content=fetcher.content, jsonpath_filter=css_filter_rule)
json_filter_prefixes = ['json:', 'jq:']
if any(prefix in css_filter_rule for prefix in json_filter_prefixes):
stripped_text_from_html = html_tools.extract_json_as_string(content=fetcher.content, json_filter=css_filter_rule)
is_html = False
if is_html or is_source: