diff options
author | asciimoo <asciimoo@gmail.com> | 2013-11-09 18:39:20 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-11-09 18:39:20 +0100 |
commit | 17bf00ee42583910e45794e1438a2bab459225ad (patch) | |
tree | f1fc78646676c40c39cda1de9b69cf5dc39ff263 /searx/engines/duckduckgo.py | |
parent | 14a53e343085083d0ddf271adff2d13ca1c94f99 (diff) | |
download | searxng-17bf00ee42583910e45794e1438a2bab459225ad.tar.gz searxng-17bf00ee42583910e45794e1438a2bab459225ad.zip |
[enh] removing result html tags
Diffstat (limited to 'searx/engines/duckduckgo.py')
-rw-r--r-- | searx/engines/duckduckgo.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index 33f56f469..d591854a5 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -1,5 +1,6 @@ from json import loads from urllib import urlencode +from searx.utils import html_to_text url = 'https://duckduckgo.com/' search_url = url + 'd.js?{query}&l=us-en&p=1&s=0' @@ -16,7 +17,7 @@ def response(resp): if not r.get('t'): continue results.append({'title': r['t'] - ,'content': r['a'] + ,'content': html_to_text(r['a']) ,'url': r['u'] }) return results |