diff --git a/changedetectionio/processors/magic.py b/changedetectionio/processors/magic.py index a742b9f88..753aa17c4 100644 --- a/changedetectionio/processors/magic.py +++ b/changedetectionio/processors/magic.py @@ -94,24 +94,21 @@ class guess_stream_type(): self.is_rss = True elif any(s in http_content_header for s in JSON_CONTENT_TYPES): self.is_json = True + elif 'pdf' in magic_content_header: + self.is_pdf = True + elif has_html_patterns or http_content_header == 'text/html': + self.is_html = True + elif any(s in magic_content_header for s in JSON_CONTENT_TYPES): + self.is_json = True + # magic will call a rss document 'xml' + # Rarely do endpoints give the right header, usually just text/xml, so we check also for