summaryrefslogtreecommitdiff
path: root/searx/autocomplete.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-01-23 17:22:13 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2022-01-23 17:22:13 +0100
commite9588b70a6304afb8ac1de73479d7ade1e01b155 (patch)
tree176ec37ed472e9039b316e63ad1d92e1f536b4f2 /searx/autocomplete.py
parent9c5bac4c4392542d9c48d61dd3fc9c96e4f514f0 (diff)
downloadsearxng-e9588b70a6304afb8ac1de73479d7ade1e01b155.tar.gz
searxng-e9588b70a6304afb8ac1de73479d7ade1e01b155.zip
[fix] brave autocompleter: charset_normalizer issues
Use httpx.Response.json() to avoid charset_normalizer issues: DEBUG charset_normalizer : override steps (5) and chunk_size (512) as content does not fit (153 byte(s) given) parameters. INFO charset_normalizer : ascii passed initial chaos probing. Mean measured chaos is 0.000000 % DEBUG charset_normalizer : ascii should target any language(s) of ['Latin Based'] INFO charset_normalizer : ascii is most likely the one. Stopping the process. [1] https://www.python-httpx.org/api/#response Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/autocomplete.py')
-rw-r--r--searx/autocomplete.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/autocomplete.py b/searx/autocomplete.py
index 00ec98bbc..8a67f8139 100644
--- a/searx/autocomplete.py
+++ b/searx/autocomplete.py
@@ -39,7 +39,7 @@ def brave(query, _lang):
results = []
if resp.ok:
- data = loads(resp.text)
+ data = resp.json()
for item in data[1]:
results.append(item)
return results