summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2017-05-22 15:48:37 +0200
committerAdam Tauber <asciimoo@gmail.com>2017-05-22 15:48:37 +0200
commit1972a044a31a846b2a589bd5e5a925621d3bbcd6 (patch)
tree4c83b3df9edfb65080809543330090e63621efce
parent8db527c1d233888b197bd2e8b2fbda8e88d0c60d (diff)
downloadsearxng-1972a044a31a846b2a589bd5e5a925621d3bbcd6.tar.gz
searxng-1972a044a31a846b2a589bd5e5a925621d3bbcd6.zip
[fix] produce valid urls if scheme is missing
-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 f466697bd..c8c56da44 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 = parsed_search_url.scheme + url
+ url = u'{0}:{1}'.format(parsed_search_url.scheme, url)
elif url.startswith('/'):
# fix relative url to the search engine
url = urljoin(search_url, url)