summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-01-03 23:54:02 +0100
committerCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-01-03 23:54:02 +0100
commit4450ed5503ab9f7b4d0dc1849837523bbe3b56dd (patch)
treea2846420337e5587add956e7cdfdd4cb5a1af8d4
parent7b531c6fcefe1c0c5cc19967454cdddb6e1c8fbd (diff)
downloadsearxng-4450ed5503ab9f7b4d0dc1849837523bbe3b56dd.tar.gz
searxng-4450ed5503ab9f7b4d0dc1849837523bbe3b56dd.zip
Digg correction
Return no result instead of crashing if no result
-rw-r--r--searx/engines/digg.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/digg.py b/searx/engines/digg.py
index 241234fdb..8c457d6b9 100644
--- a/searx/engines/digg.py
+++ b/searx/engines/digg.py
@@ -44,6 +44,9 @@ def response(resp):
search_result = loads(resp.text)
+ if search_result['html'] == '':
+ return results
+
dom = html.fromstring(search_result['html'])
# parse results