diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-02-22 18:03:24 +0100 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2021-02-24 18:48:36 +0100 |
| commit | 7c1847d5f2f78392d4e7f6b4892d732f6520b3dc (patch) | |
| tree | fdaeb721ffc7c6bb55858790f211546bbe935323 /searx/data/__init__.py | |
| parent | 606aa79e4949cd29d207443a3f82c368fbae2faf (diff) | |
[mod] add utils/fetch_external_bangs.py
Based on duckduckgo bangs
Store bangs on a trie to allow autocomplete (not in this commit)
Diffstat (limited to 'searx/data/__init__.py')
| -rw-r--r-- | searx/data/__init__.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/searx/data/__init__.py b/searx/data/__init__.py index 29ac5b7a2..c482a6b5a 100644 --- a/searx/data/__init__.py +++ b/searx/data/__init__.py @@ -2,7 +2,7 @@ import json from pathlib import Path -__init__ = ['ENGINES_LANGUGAGES', 'CURRENCIES', 'USER_AGENTS', 'EXTERNAL_URLS', 'WIKIDATA_UNITS', +__init__ = ['ENGINES_LANGUGAGES', 'CURRENCIES', 'USER_AGENTS', 'EXTERNAL_URLS', 'WIKIDATA_UNITS', 'EXTERNAL_BANGS', 'bangs_loader', 'ahmia_blacklist_loader'] data_dir = Path(__file__).parent @@ -12,10 +12,6 @@ def load(filename): return json.load(fd) -def bangs_loader(): - return load('bangs.json') - - def ahmia_blacklist_loader(): with open(str(data_dir / 'ahmia_blacklist.txt'), encoding='utf-8') as fd: return fd.read().split() @@ -26,3 +22,4 @@ CURRENCIES = load('currencies.json') USER_AGENTS = load('useragents.json') EXTERNAL_URLS = load('external_urls.json') WIKIDATA_UNITS = load('wikidata_units.json') +EXTERNAL_BANGS = load('external_bangs.json') |