From fe5dbf1ce0fd6a80ca240e71e381963deb7ac3f5 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 22 Jan 2022 13:22:39 +0100 Subject: [PATCH] wsgi: reuse mimetype table from crawler --- morss/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/wsgi.py b/morss/wsgi.py index bb6e329..43f08dc 100644 --- a/morss/wsgi.py +++ b/morss/wsgi.py @@ -194,7 +194,7 @@ def cgi_get(environ, start_response): # get page req = crawler.adv_get(url=url, timeout=TIMEOUT) - if req['contenttype'] in ['text/html', 'application/xhtml+xml', 'application/xml']: + if req['contenttype'] in crawler.MIMETYPE['html']: if options['get'] == 'page': html = readabilite.parse(req['data'], encoding=req['encoding']) html.make_links_absolute(req['url'])