summaryrefslogtreecommitdiff
path: root/searx/results.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-06-28 00:06:50 +0200
committerAdam Tauber <asciimoo@gmail.com>2016-06-28 00:06:50 +0200
commit2f7752b410c449aac463c248c0b7e41f69b6b07b (patch)
treecf39c310166874a1b3c8fb28a3e925e969794429 /searx/results.py
parent36c8977390b50259de56cc9678499340c78ee25b (diff)
downloadsearxng-2f7752b410c449aac463c248c0b7e41f69b6b07b.tar.gz
searxng-2f7752b410c449aac463c248c0b7e41f69b6b07b.zip
[enh] display number of results
Diffstat (limited to 'searx/results.py')
-rw-r--r--searx/results.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/results.py b/searx/results.py
index c3040b305..dcd966ef7 100644
--- a/searx/results.py
+++ b/searx/results.py
@@ -99,6 +99,7 @@ class ResultContainer(object):
self._infobox_ids = {}
self.suggestions = set()
self.answers = set()
+ self.number_of_results = 0
def extend(self, engine_name, results):
for result in list(results):
@@ -111,6 +112,9 @@ class ResultContainer(object):
elif 'infobox' in result:
self._merge_infobox(result)
results.remove(result)
+ elif 'number_of_results' in result:
+ self.number_of_results = max(self.number_of_results, result['number_of_results'])
+ results.remove(result)
with RLock():
engines[engine_name].stats['search_count'] += 1