logo

searx

My custom branche(s) on searx, a meta-search engine
commit: 1972a044a31a846b2a589bd5e5a925621d3bbcd6
parent: 8db527c1d233888b197bd2e8b2fbda8e88d0c60d
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Mon, 22 May 2017 15:48:37 +0200

[fix] produce valid urls if scheme is missing

Diffstat:

Msearx/engines/xpath.py2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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)