wikijs test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mol
2023-12-06 13:53:26 +08:00
parent eaf2dd3c87
commit 026fbf0d03

View File

@ -41,13 +41,11 @@ def identity(arg):
def response(resp): def response(resp):
results = [] results = []
json = loads(resp.text) json = loads(resp.text)
title_filter = identity title_filter = identity
content_filter = identity content_filter = identity
for search_result in json: search_result = json['data']['pages']['search']
search = search_result['data']['pages']['search'] rs = search_result['results']
rs = search['results']
if not len(rs): if not len(rs):
return results return results
for result in rs: for result in rs:
@ -63,6 +61,6 @@ def response(resp):
'content': '', 'content': '',
} }
) )
for suggestion in search['suggestions']: for suggestion in search_result['suggestions']:
results.append({'suggestion': suggestion}) results.append({'suggestion': suggestion})
return results return results