summaryrefslogtreecommitdiff
path: root/searx/engines/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/__init__.py')
-rw-r--r--searx/engines/__init__.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
new file mode 100644
index 000000000..34d88b749
--- /dev/null
+++ b/searx/engines/__init__.py
@@ -0,0 +1,15 @@
+
+from os.path import realpath, dirname, splitext, join
+from os import listdir
+from imp import load_source
+
+engine_dir = dirname(realpath(__file__))
+
+engines = []
+
+for filename in listdir(engine_dir):
+ modname = splitext(filename)[0]
+ if filename.startswith('_') or not filename.endswith('.py'):
+ continue
+ filepath = join(engine_dir, filename)
+ engines.append(load_source(modname, filepath))