wsgi: reuse mimetype table from crawler

master
pictuga 2022-01-22 13:22:39 +01:00
parent fdf9acd32b
commit fe5dbf1ce0
1 changed files with 1 additions and 1 deletions

View File

@ -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'])