summaryrefslogtreecommitdiff
path: root/searx/engines/gigablast.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-09-11 17:57:09 +0200
committerAdam Tauber <asciimoo@gmail.com>2015-09-11 17:57:09 +0200
commite3df22b1401742ae0ade324ce4403f2b2b45dfe1 (patch)
treed54d52c644eb4daf80939a25a045168779c4b19e /searx/engines/gigablast.py
parent23dab175b2b0742de30129a45488b5c8162ff5c6 (diff)
downloadsearxng-e3df22b1401742ae0ade324ce4403f2b2b45dfe1.tar.gz
searxng-e3df22b1401742ae0ade324ce4403f2b2b45dfe1.zip
[fix] handle missing url scheme - fixes #428
Diffstat (limited to 'searx/engines/gigablast.py')
-rw-r--r--searx/engines/gigablast.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/engines/gigablast.py b/searx/engines/gigablast.py
index b852de9ba..04513cc98 100644
--- a/searx/engines/gigablast.py
+++ b/searx/engines/gigablast.py
@@ -53,6 +53,8 @@ def response(resp):
# parse results
for result in dom.xpath(results_xpath):
url = result.xpath(url_xpath)[0].text
+ if not url.startswith('http://') and not url.startswith('https://'):
+ url = 'http://' + url
title = result.xpath(title_xpath)[0].text
content = escape(result.xpath(content_xpath)[0].text)