summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2017-11-02 01:08:15 +0100
committerAdam Tauber <asciimoo@gmail.com>2017-11-02 01:08:15 +0100
commit7a9b18e9e9847252549408108ec72c1c8d2296b7 (patch)
tree19982ce7dfb62c0b54e13c729379ba5d84a3a803
parent181f1c630534d004815687222b737fdab76371c7 (diff)
downloadsearxng-7a9b18e9e9847252549408108ec72c1c8d2296b7.tar.gz
searxng-7a9b18e9e9847252549408108ec72c1c8d2296b7.zip
[mod] add more error handling to json engine II.
-rw-r--r--searx/engines/json_engine.py7
1 files 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: