summaryrefslogtreecommitdiff
path: root/searx/engines/xpath.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2018-04-09 09:34:26 +0200
committerGitHub <noreply@github.com>2018-04-09 09:34:26 +0200
commite5def5b0191a36315d300457cdfdf68aebbc9a4c (patch)
tree3a969551bf2f3c899b12dd5a5ea2522f7b605942 /searx/engines/xpath.py
parent283f6c905340087d7511bfcdb815c0b4183bcdda (diff)
parent96877862269f35aefc0b3ca7a7cb8812b1555dc4 (diff)
Merge pull request #1260 from MarcAbonce/engine-fixes
[fix] Engine fixes
Diffstat (limited to 'searx/engines/xpath.py')
-rw-r--r--searx/engines/xpath.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py
index c8c56da44..50f98d935 100644
--- a/searx/engines/xpath.py
+++ b/searx/engines/xpath.py
@@ -53,7 +53,7 @@ def extract_url(xpath_results, search_url):
if url.startswith('//'):
# add http or https to this kind of url //example.com/
parsed_search_url = urlparse(search_url)
- url = u'{0}:{1}'.format(parsed_search_url.scheme, url)
+ url = u'{0}:{1}'.format(parsed_search_url.scheme or 'http', url)
elif url.startswith('/'):
# fix relative url to the search engine
url = urljoin(search_url, url)