summaryrefslogtreecommitdiff
path: root/searx/utils.py
diff options
context:
space:
mode:
authorZhijie He <hezhijie0327@hotmail.com>2025-05-22 00:25:02 +0800
committerGitHub <noreply@github.com>2025-05-21 18:25:02 +0200
commit156d1eb8c85c01c94723188859fa7526c7d72698 (patch)
tree7a8f627d62580103e504aaf8ac8ec47c132bbdf0 /searx/utils.py
parent365b9426f17d3372647c89307ad7175f862834e8 (diff)
[feat] engines: add Naver engine (#4573)
Refactor Naver engine (Web, News, Images, Videos, Autocomplete) - ref: https://search.naver.com/ - lang: `ko` - Wikidata: https://www.wikidata.org/wiki/Q485639 Co-authored-by: Bnyro <bnyro@tutanota.com>
Diffstat (limited to 'searx/utils.py')
-rw-r--r--searx/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/searx/utils.py b/searx/utils.py
index a28171a32..3c60851fa 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -830,6 +830,11 @@ def js_variable_to_python(js_variable):
s = _JS_DECIMAL_RE.sub(":0.", s)
# replace the surogate character by colon
s = s.replace(chr(1), ':')
+ # replace single-quote followed by comma with double-quote and comma
+ # {"a": "\"12\"',"b": "13"}
+ # becomes
+ # {"a": "\"12\"","b": "13"}
+ s = s.replace("',", "\",")
# load the JSON and return the result
return json.loads(s)