summaryrefslogtreecommitdiff
path: root/searx/external_bang.py
diff options
context:
space:
mode:
authorDalf <alex@al-f.net>2020-07-11 12:23:08 +0200
committerDalf <alex@al-f.net>2020-07-11 12:23:08 +0200
commit718715180dee0e76266417094df5de64dd274cec (patch)
tree6253f222fc0f014be348a2d813174776ac56f833 /searx/external_bang.py
parentf9faafa89698f0f32f2a6dc34473c6e33f82092d (diff)
downloadsearxng-718715180dee0e76266417094df5de64dd274cec.tar.gz
searxng-718715180dee0e76266417094df5de64dd274cec.zip
[mod] external_bang.py: always read bangs.json with a UTF-8 file.
Diffstat (limited to 'searx/external_bang.py')
-rw-r--r--searx/external_bang.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/external_bang.py b/searx/external_bang.py
index f8b9c44d3..0b4c4ae16 100644
--- a/searx/external_bang.py
+++ b/searx/external_bang.py
@@ -9,7 +9,7 @@ from searx import searx_dir
# NOTE only use the get_bang_url
bangs_data = {}
-with open(join(searx_dir, 'data/bangs.json')) as json_file:
+with open(join(searx_dir, 'data/bangs.json'), encoding='utf-8') as json_file:
for bang in json.load(json_file)['bang']:
for trigger in bang["triggers"]:
bangs_data[trigger] = {x: y for x, y in bang.items() if x != "triggers"}