forked from Icycoide/searxng
[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>
This commit is contained in:
parent
365b9426f1
commit
156d1eb8c8
5 changed files with 256 additions and 18 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue