on master help sign in
[fix] produce valid urls if scheme is missing
commit1972a044a31a846b2a589bd5e5a925621d3bbcd6 authorAdam Tauber <asciimoo@gmail.com> dateMon 22 May 2017, 15:48 (9 years ago) parent8db527c
1 file changed+1−1
searx/engines/xpath.py+1−1
searx/engines/xpath.py+1−1
@@ -53,7 +53,7 @@ def extract_url(xpath_results, search_url):
5353 if url.startswith('//'):
5454 # add http or https to this kind of url //example.com/
5555 parsed_search_url = urlparse(search_url)
56− url = parsed_search_url.scheme + url
56+ url = u'{0}:{1}'.format(parsed_search_url.scheme, url)
5757 elif url.startswith('/'):
5858 # fix relative url to the search engine
5959 url = urljoin(search_url, url)