mirror of https://github.com/searxng/searxng.git
[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>
This commit is contained in:
parent
9c5bac4c43
commit
e9588b70a6
|
@ -39,7 +39,7 @@ def brave(query, _lang):
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
if resp.ok:
|
if resp.ok:
|
||||||
data = loads(resp.text)
|
data = resp.json()
|
||||||
for item in data[1]:
|
for item in data[1]:
|
||||||
results.append(item)
|
results.append(item)
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Reference in New Issue