diff options
author | Adam Tauber <asciimoo@gmail.com> | 2018-03-22 14:41:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 14:41:42 +0100 |
commit | 0cb55ddfde3a2687ca7a647ac95ffe484e12471b (patch) | |
tree | b21dd9ad903afe756ce43ce996e1806e26cbd2c1 /searx/query.py | |
parent | b9d4c0523e8d6eab81658d77f8213b39f9b28f17 (diff) | |
parent | 8cc529e9a3976e48676676600379ce43f690dd8c (diff) | |
download | searxng-0cb55ddfde3a2687ca7a647ac95ffe484e12471b.tar.gz searxng-0cb55ddfde3a2687ca7a647ac95ffe484e12471b.zip |
Merge pull request #1136 from kvch/add-findx-general
Add findx engine
Diffstat (limited to 'searx/query.py')
-rw-r--r-- | searx/query.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/searx/query.py b/searx/query.py index 6e5f2e883..f7543e3e1 100644 --- a/searx/query.py +++ b/searx/query.py @@ -107,14 +107,21 @@ class RawTextQuery(object): # check if prefix is equal with engine shortcut if prefix in engine_shortcuts: parse_next = True - self.engines.append({'category': 'none', - 'name': engine_shortcuts[prefix]}) + engine_name = engine_shortcuts[prefix] + if engine_name in engines: + for engine_category in engines[engine_name].categories: + self.engines.append({'category': engine_category, + 'name': engine_name, + 'from_bang': True}) # check if prefix is equal with engine name elif prefix in engines: parse_next = True - self.engines.append({'category': 'none', - 'name': prefix}) + if prefix in engines: + for engine_category in engines[engine_name].categories: + self.engines.append({'category': engine_category, + 'name': engine_name, + 'from_bang': True}) # check if prefix is equal with categorie name elif prefix in categories: |