Browse Source

[fix] handle missing url scheme - fixes #428

Adam Tauber 9 years ago
parent
commit
e3df22b140
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      searx/engines/gigablast.py

+ 2
- 0
searx/engines/gigablast.py View File

@@ -53,6 +53,8 @@ def response(resp):
53 53
     # parse results
54 54
     for result in dom.xpath(results_xpath):
55 55
         url = result.xpath(url_xpath)[0].text
56
+        if not url.startswith('http://') and not url.startswith('https://'):
57
+            url = 'http://' + url
56 58
         title = result.xpath(title_xpath)[0].text
57 59
         content = escape(result.xpath(content_xpath)[0].text)
58 60