SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] read utf-8 files (settings, languages, currency) with python3.5
Marc Abonce Seguin829032f306ce
diff --git a/searx/__init__.py b/searx/__init__.pyindex d277570bb..b1010f25f 100644--- a/searx/__init__.py+++ b/searx/__init__.py@@ -19,6 +19,7 @@ import certifiimport loggingfrom os import environfrom os.path import realpath, dirname, join, abspath, isfile+from io import openfrom ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSIONtry:from yaml import load@@ -50,7 +51,7 @@ if not settings_path:raise Exception('settings.yml not found')# load settings-with open(settings_path, 'rb') as settings_yaml:+with open(settings_path, 'r', encoding='utf-8') as settings_yaml:settings = load(settings_yaml)'''diff --git a/searx/engines/__init__.py b/searx/engines/__init__.pyindex bec8de3a8..b4479157b 100644--- a/searx/engines/__init__.py+++ b/searx/engines/__init__.py@@ -19,6 +19,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.import sysimport threadingfrom os.path import realpath, dirname+from io import openfrom flask_babel import gettextfrom operator import itemgetterfrom json import loads@@ -36,7 +37,7 @@ engines = {}categories = {'general': []}-languages = loads(open(engine_dir + '/../data/engines_languages.json', 'rb').read())+languages = loads(open(engine_dir + '/../data/engines_languages.json', 'r', encoding='utf-8').read())engine_shortcuts = {}engine_default_args = {'paging': False,diff --git a/searx/engines/currency_convert.py b/searx/engines/currency_convert.pyindex 34a9af678..9c1c2f7b3 100644--- a/searx/engines/currency_convert.py+++ b/searx/engines/currency_convert.py@@ -4,6 +4,7 @@ import osimport sysimport unicodedata+from io import openfrom datetime import datetimeif sys.version_info[0] == 3:@@ -94,7 +95,7 @@ def load():global dbcurrent_dir = os.path.dirname(os.path.realpath(__file__))- json_data = open(current_dir + "/../data/currencies.json", 'rb').read()+ json_data = open(current_dir + "/../data/currencies.json", 'r', encoding='utf-8').read()db = json.loads(json_data)