logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 13a4582a40fd91b073dd54b4d93b7df882035ba9
parent: 7965da55a7a3f494722750011b2a6d5110956750
Author: asciimoo <asciimoo@gmail.com>
Date:   Sun, 27 Oct 2013 13:55:18 +0100

[enh] search count

Diffstat:

searx/engines/__init__.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py @@ -32,6 +32,7 @@ searx_dir = join(engine_dir, '../../') engines_config = ConfigParser.SafeConfigParser() engines_config.read(join(searx_dir, 'engines.cfg')) +number_of_searches = 0 engines = {} @@ -90,10 +91,11 @@ def make_callback(engine_name, results, callback, params): return process_callback def search(query, request, selected_categories): - global engines, categories + global engines, categories, number_of_searches requests = [] results = {} selected_engines = [] + number_of_searches += 1 user_agent = request.headers.get('User-Agent', '') if not len(selected_categories): selected_categories = ['general']