logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: a764ebb4b1025e017c2e10bc9b93066cfcfffcda
parent: c3dcebb778e718c52f013be47dd9ff141421273d
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Sat, 10 Dec 2016 21:38:34 +0100

[enh] extend json response with suggestions, infoboxes and answers

Diffstat:

searx/webapp.py | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/searx/webapp.py b/searx/webapp.py @@ -470,7 +470,10 @@ def index(): if output_format == 'json': return Response(json.dumps({'query': search_query.query, 'number_of_results': number_of_results, - 'results': results}), + 'results': results, + 'answers': list(result_container.answers), + 'infoboxes': result_container.infoboxes, + 'suggestions': list(result_container.suggestions)}), mimetype='application/json') elif output_format == 'csv': csv = UnicodeWriter(cStringIO.StringIO())