summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/brave.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/brave.py b/searx/engines/brave.py
index d5e2d3e9f..e9d4af762 100644
--- a/searx/engines/brave.py
+++ b/searx/engines/brave.py
@@ -104,7 +104,6 @@ from urllib.parse import (
parse_qs,
)
-import chompjs
from lxml import html
from searx import locales
@@ -112,6 +111,7 @@ from searx.utils import (
extract_text,
eval_xpath_list,
eval_xpath_getindex,
+ js_variable_to_python,
)
from searx.enginelib.traits import EngineTraits
@@ -215,7 +215,7 @@ def response(resp):
datastr = line.replace("const data = ", "").strip()[:-1]
break
- json_data = chompjs.parse_js_object(datastr)
+ json_data = js_variable_to_python(datastr)
json_resp = json_data[1]['data']['body']['response']
if brave_category == 'news':