summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-19 19:01:06 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-19 19:01:06 +0200
commit5ee0b7bb80b0a88e1e892eb90aea0597553e926e (patch)
treec79e35d6a90e8f3579ee77e841363677d7c7d019 /searx/engines
parent1308ebf65777cc85fdcf917c452e68bdd924f6a7 (diff)
downloadsearxng-5ee0b7bb80b0a88e1e892eb90aea0597553e926e.tar.gz
searxng-5ee0b7bb80b0a88e1e892eb90aea0597553e926e.zip
[enh] engine blacklist support
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index 6f02dec54..0b56d5f0a 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -23,6 +23,7 @@ import grequests
from itertools import izip_longest, chain
from operator import itemgetter
from urlparse import urlparse
+from searx import settings
engine_dir = dirname(realpath(__file__))
@@ -31,9 +32,11 @@ engines = {}
categories = {'general': []}
for filename in listdir(engine_dir):
- modname = splitext(filename)[0]
if filename.startswith('_') or not filename.endswith('.py'):
continue
+ modname = splitext(filename)[0]
+ if modname in settings.blacklist:
+ continue
filepath = join(engine_dir, filename)
engine = load_source(modname, filepath)
engine.name = modname