summaryrefslogtreecommitdiff
path: root/searx/query.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-01-31 23:11:48 +0100
committerAdam Tauber <asciimoo@gmail.com>2015-01-31 23:11:48 +0100
commit78828efdb0ea28efa057dbd82b240af1112f085a (patch)
treebce2b1c823e284b93872a3614eafcce6b369cfd0 /searx/query.py
parentb19e681cce9cef4993b17d3a89d743208f8d5c05 (diff)
downloadsearxng-78828efdb0ea28efa057dbd82b240af1112f085a.tar.gz
searxng-78828efdb0ea28efa057dbd82b240af1112f085a.zip
[enh] allow override of blocked engines from query string
Diffstat (limited to 'searx/query.py')
-rw-r--r--searx/query.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/searx/query.py b/searx/query.py
index e491284f0..567c49e92 100644
--- a/searx/query.py
+++ b/searx/query.py
@@ -88,18 +88,16 @@ class Query(object):
prefix = query_part[1:].replace('_', ' ')
# check if prefix is equal with engine shortcut
- if prefix in engine_shortcuts\
- and not engine_shortcuts[prefix] in self.blocked_engines:
+ if prefix in engine_shortcuts:
parse_next = True
self.engines.append({'category': 'none',
'name': engine_shortcuts[prefix]})
# check if prefix is equal with engine name
- elif prefix in engines\
- and prefix not in self.blocked_engines:
+ elif prefix in engines:
parse_next = True
self.engines.append({'category': 'none',
- 'name': prefix})
+ 'name': prefix})
# check if prefix is equal with categorie name
elif prefix in categories:
@@ -107,7 +105,7 @@ class Query(object):
# are declared under that categorie name
parse_next = True
self.engines.extend({'category': prefix,
- 'name': engine.name}
+ 'name': engine.name}
for engine in categories[prefix]
if engine not in self.blocked_engines)