summaryrefslogtreecommitdiff
path: root/searx/engines/xpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/xpath.py')
-rw-r--r--searx/engines/xpath.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py
index 97c84bd09..90b551a33 100644
--- a/searx/engines/xpath.py
+++ b/searx/engines/xpath.py
@@ -269,6 +269,10 @@ def response(resp): # pylint: disable=too-many-branches
raise_for_httperror(resp)
results = []
+
+ if not resp.text:
+ return results
+
dom = html.fromstring(resp.text)
is_onion = 'onions' in categories