summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/__init__.py12
-rw-r--r--searx/settings.yml2
2 files changed, 10 insertions, 4 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index 782b622b0..14376c31f 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -57,11 +57,17 @@ def load_module(filename):
def load_engine(engine_data):
- engine_name = engine_data['engine']
+
+ if '_' in engine_data['name']:
+ logger.error('Engine name conains underscore: "{}"'.format(engine_data['name']))
+ sys.exit(1)
+
+ engine_module = engine_data['engine']
+
try:
- engine = load_module(engine_name + '.py')
+ engine = load_module(engine_module + '.py')
except:
- logger.exception('Cannot load engine "{}"'.format(engine_name))
+ logger.exception('Cannot load engine "{}"'.format(engine_module))
return None
for param_name in engine_data:
diff --git a/searx/settings.yml b/searx/settings.yml
index 308a0bd45..72bc7ed0f 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -377,7 +377,7 @@ engines:
timeout : 10.0
disabled : True
- - name : scanr_structures
+ - name : scanr structures
shortcut: scs
engine : scanr_structures
disabled : True