summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-12-10 21:27:47 +0100
committerAdam Tauber <asciimoo@gmail.com>2016-12-10 21:31:05 +0100
commitc3dcebb778e718c52f013be47dd9ff141421273d (patch)
tree969e0bb78cd63ac4c70a9253446ba2d83fa8339a /searx/engines
parentbe6ae81cb2dbe3a9524470c6e16fca699950ce61 (diff)
downloadsearxng-c3dcebb778e718c52f013be47dd9ff141421273d.tar.gz
searxng-c3dcebb778e718c52f013be47dd9ff141421273d.zip
[fix] remove html tags from qwant results
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/qwant.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/searx/engines/qwant.py b/searx/engines/qwant.py
index 872bd4e95..d8b084292 100644
--- a/searx/engines/qwant.py
+++ b/searx/engines/qwant.py
@@ -10,9 +10,11 @@
@parse url, title, content
"""
-from urllib import urlencode
-from json import loads
from datetime import datetime
+from json import loads
+from urllib import urlencode
+
+from searx.utils import html_to_text
# engine dependent config
categories = None
@@ -66,9 +68,9 @@ def response(resp):
# parse results
for result in res.get('items', {}):
- title = result['title']
+ title = html_to_text(result['title'])
res_url = result['url']
- content = result['desc']
+ content = html_to_text(result['desc'])
if category_to_keyword.get(categories[0], '') == 'web':
results.append({'title': title,