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):
results = []
json = loads(resp.text)
title_filter = identity
content_filter = identity
for search_result in json:
search = search_result['data']['pages']['search']
rs = search['results']
search_result = json['data']['pages']['search']
rs = search_result['results']
if not len(rs):
return results
for result in rs:
@ -63,6 +61,6 @@ def response(resp):
'content': '',
}
)
for suggestion in search['suggestions']:
for suggestion in search_result['suggestions']:
results.append({'suggestion': suggestion})
return results