mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[fix] comamnd engine: fix import
This commit is contained in:
parent
a08df82574
commit
eed43783f9
@ -14,8 +14,8 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
import re
|
||||||
from os.path import expanduser, isabs, realpath, commonprefix
|
from os.path import expanduser, isabs, realpath, commonprefix
|
||||||
from re import MULTILINE, search as re_search
|
|
||||||
from shlex import split as shlex_split
|
from shlex import split as shlex_split
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
from time import time
|
from time import time
|
||||||
@ -59,7 +59,7 @@ def init(engine_settings):
|
|||||||
if 'parse_regex' in engine_settings:
|
if 'parse_regex' in engine_settings:
|
||||||
parse_regex = engine_settings['parse_regex']
|
parse_regex = engine_settings['parse_regex']
|
||||||
for result_key, regex in parse_regex.items():
|
for result_key, regex in parse_regex.items():
|
||||||
_compiled_parse_regex[result_key] = re.compile(regex, flags=MULTILINE)
|
_compiled_parse_regex[result_key] = re.compile(regex, flags=re.MULTILINE)
|
||||||
if 'delimiter' in engine_settings:
|
if 'delimiter' in engine_settings:
|
||||||
delimiter = engine_settings['delimiter']
|
delimiter = engine_settings['delimiter']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user