forked from Ponysearch/Ponysearch
[enh] engine blacklist support
This commit is contained in:
parent
1308ebf657
commit
5ee0b7bb80
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue