summaryrefslogtreecommitdiff
path: root/searx/engines/__init__.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-11-04 00:18:07 +0100
committerasciimoo <asciimoo@gmail.com>2013-11-04 00:18:07 +0100
commit70278567ecacd1632dfdfdff6dbcc0f14a8fab02 (patch)
tree597914a910d327ce815271170aa95a89e98c8dfc /searx/engines/__init__.py
parentd2a952ecdf5b4580fcb1ee21b1a2cb9a02873685 (diff)
downloadsearxng-70278567ecacd1632dfdfdff6dbcc0f14a8fab02.tar.gz
searxng-70278567ecacd1632dfdfdff6dbcc0f14a8fab02.zip
[mod] searching by selected engines
Diffstat (limited to 'searx/engines/__init__.py')
-rw-r--r--searx/engines/__init__.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index 7ea9e7652..85c9be4d8 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -97,20 +97,13 @@ def make_callback(engine_name, results, callback, params):
results[engine_name] = cb_res
return process_callback
-def search(query, request, selected_categories):
+def search(query, request, selected_engines):
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']
-
- for categ in selected_categories:
- selected_engines.extend({'category': categ, 'name': x.name} for x in categories[categ])
-
for selected_engine in selected_engines:
if selected_engine['name'] not in engines:
continue