From a0e4f9b88ab7ea3f9fd03d46df6edddf343e2519 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 17 Feb 2022 18:16:23 +0100 Subject: [PATCH] better checking of JSON type --- changedetectionio/fetch_site_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/fetch_site_status.py b/changedetectionio/fetch_site_status.py index d75c0c6e..43cf7383 100644 --- a/changedetectionio/fetch_site_status.py +++ b/changedetectionio/fetch_site_status.py @@ -102,7 +102,7 @@ class perform_site_check(): # https://stackoverflow.com/questions/41817578/basic-method-chaining ? # return content().textfilter().jsonextract().checksumcompare() ? - is_json = fetcher.headers.get('Content-Type', '') == 'application/json' + is_json = 'application/json' in fetcher.headers.get('Content-Type', '') is_html = not is_json css_filter_rule = watch['css_filter']