summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-15 22:18:08 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-15 22:18:08 +0200
commit9e1ded688fc1c91c48ae13c071c1971bf006fca6 (patch)
tree582c3c188e01d78d2571da73fab7d221c9fabed5 /searx/webapp.py
parente4b768b6ccc6bc553665dddfa23e54bf4e75875e (diff)
[enh] engine selection support
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 1c88bcc6f..bfef5f6b6 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -47,8 +47,14 @@ def index():
if not request.form.get('q'):
flash('Wrong post data')
return render('index.html')
+ selected_engines = []
+ for pd_name,pd in request.form.items():
+ print pd
+ if pd_name.startswith('engine_'):
+ selected_engines.append(pd_name[7:])
+ print selected_engines
query = request.form['q']
- results = search(query, request)
+ results = search(query, request, selected_engines)
return render('results.html', results=results, q=query)
return render('index.html')