[mod] add more error handling to json engine II.

This commit is contained in:
Adam Tauber 2017-11-02 01:08:15 +01:00
parent 181f1c6305
commit 7a9b18e9e9
1 changed files with 5 additions and 2 deletions

View File

@ -102,8 +102,11 @@ def response(resp):
if not len(rs):
return results
for result in rs[0]:
url = query(result, url_query)[0]
title = query(result, title_query)[0]
try:
url = query(result, url_query)[0]
title = query(result, title_query)[0]
except:
continue
try:
content = query(result, content_query)[0]
except: