1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

[enh] search count

This commit is contained in:
asciimoo 2013-10-27 13:55:18 +01:00
parent 7965da55a7
commit 13a4582a40

View File

@ -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']