diff options
author | Adam Tauber <asciimoo@gmail.com> | 2017-11-02 01:08:15 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2017-11-02 01:08:15 +0100 |
commit | 7a9b18e9e9847252549408108ec72c1c8d2296b7 (patch) | |
tree | 19982ce7dfb62c0b54e13c729379ba5d84a3a803 /searx | |
parent | 181f1c630534d004815687222b737fdab76371c7 (diff) | |
download | searxng-7a9b18e9e9847252549408108ec72c1c8d2296b7.tar.gz searxng-7a9b18e9e9847252549408108ec72c1c8d2296b7.zip |
[mod] add more error handling to json engine II.
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/json_engine.py | 7 |
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: |