This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user