Merge branch 'master' into searchpy2

This commit is contained in:
Alexandre Flament 2016-12-09 23:11:45 +01:00 committed by GitHub
commit e48f07a367
63 changed files with 392 additions and 201 deletions

View file

@ -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 = []