summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2016-12-09 23:11:45 +0100
committerGitHub <noreply@github.com>2016-12-09 23:11:45 +0100
commite48f07a367e55bf8aa881902b977bd7ce1cd2bb6 (patch)
tree8b285b2dd483006d08c03b9fec49cba49ff16a87 /searx/search.py
parent219f047bf359ce94397241b875639f3aaddb0fe5 (diff)
parentd80fb2c8e8995facb3a25c152c47a93eecf1fee4 (diff)
downloadsearxng-e48f07a367e55bf8aa881902b977bd7ce1cd2bb6.tar.gz
searxng-e48f07a367e55bf8aa881902b977bd7ce1cd2bb6.zip
Merge branch 'master' into searchpy2
Diffstat (limited to 'searx/search.py')
-rw-r--r--searx/search.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/searx/search.py b/searx/search.py
index f01f2d9c7..7dfcd4eeb 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -24,6 +24,7 @@ import searx.poolrequests as requests_lib
from searx.engines import (
categories, engines
)
+from searx.answerers import ask
from searx.utils import gen_useragent
from searx.query import RawTextQuery, SearchQuery
from searx.results import ResultContainer
@@ -300,6 +301,14 @@ class Search(object):
# start time
start_time = time()
+ # answeres ?
+ answerers_results = ask(self.search_query)
+
+ if answerers_results:
+ for results in answerers_results:
+ self.result_container.extend('answer', results)
+ return self.result_container
+
# init vars
requests = []