[fix] handling empty resultset II.

This commit is contained in:
asciimoo 2013-10-20 20:02:20 +02:00
parent 126682a6ce
commit 986c8e51a8
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ def response(resp):
search_res = loads(resp.text) search_res = loads(resp.text)
if 'responseData' not in search_res: if 'responseData' not in search_res:
return [] return []
if 'results' not in search_res['responseData']: if 'results' not in search_res['responseData'] and search_res['responseData']['results']:
return [] return []
for result in search_res['responseData']['results']: for result in search_res['responseData']['results']:
url = result['originalContextUrl'] url = result['originalContextUrl']