forked from Ponysearch/Ponysearch
Thanks @pointhi !
This commit is contained in:
parent
bc2d5bf88c
commit
4d0aeae567
1 changed files with 3 additions and 3 deletions
|
@ -49,17 +49,17 @@ def searx_bang(full_query):
|
||||||
# check if query starts with categorie name
|
# check if query starts with categorie name
|
||||||
for categorie in categories:
|
for categorie in categories:
|
||||||
if categorie.startswith(engine_query):
|
if categorie.startswith(engine_query):
|
||||||
results.append('!{categorie}'.format(categorie=categorie))
|
results.append(first_char+'{categorie}'.format(categorie=categorie))
|
||||||
|
|
||||||
# check if query starts with engine name
|
# check if query starts with engine name
|
||||||
for engine in engines:
|
for engine in engines:
|
||||||
if engine.startswith(engine_query.replace('_', ' ')):
|
if engine.startswith(engine_query.replace('_', ' ')):
|
||||||
results.append('!{engine}'.format(engine=engine.replace(' ', '_')))
|
results.append(first_char+'{engine}'.format(engine=engine.replace(' ', '_')))
|
||||||
|
|
||||||
# check if query starts with engine shortcut
|
# check if query starts with engine shortcut
|
||||||
for engine_shortcut in engine_shortcuts:
|
for engine_shortcut in engine_shortcuts:
|
||||||
if engine_shortcut.startswith(engine_query):
|
if engine_shortcut.startswith(engine_query):
|
||||||
results.append('!{engine_shortcut}'.format(engine_shortcut=engine_shortcut))
|
results.append(first_char+'{engine_shortcut}'.format(engine_shortcut=engine_shortcut))
|
||||||
|
|
||||||
# check if current query stats with :bang
|
# check if current query stats with :bang
|
||||||
elif first_char == ':':
|
elif first_char == ':':
|
||||||
|
|
Loading…
Reference in a new issue