[fix] handle missing url scheme - fixes #428
commite3df22b1401742ae0ade324ce4403f2b2b45dfe1
authorAdam Tauber <asciimoo@gmail.com>
dateFri 11 Sep 2015, 17:57 (11 years ago)
parent23dab17
searx/engines/gigablast.py+2
@@ -53,6 +53,8 @@ def response(resp):
5353 # parse results
5454 for result in dom.xpath(results_xpath):
5555 url = result.xpath(url_xpath)[0].text
56+ if not url.startswith('http://') and not url.startswith('https://'):
57+ url = 'http://' + url
5658 title = result.xpath(title_xpath)[0].text
5759 content = escape(result.xpath(content_xpath)[0].text)
5860