From 7a9b18e9e9847252549408108ec72c1c8d2296b7 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Thu, 2 Nov 2017 01:08:15 +0100 Subject: [PATCH] [mod] add more error handling to json engine II. --- searx/engines/json_engine.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/searx/engines/json_engine.py b/searx/engines/json_engine.py index fa169f015..eeae5c235 100644 --- a/searx/engines/json_engine.py +++ b/searx/engines/json_engine.py @@ -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: