summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-08-24 13:23:13 +0200
committerAdam Tauber <asciimoo@gmail.com>2015-08-24 13:23:13 +0200
commitc43476229b58f20dba62c0f623ae2dad96bc8525 (patch)
tree5883a13486a54e96980eedefdd37cea4c6f7b439 /searx/search.py
parent3a8eafcc6b19b4b47b10534fbc683e4e3fbc064d (diff)
parent996c96fffff328497c2ba305c61e064256c84188 (diff)
Merge pull request #405 from pointhi/bug_fixes
some Bug fixes
Diffstat (limited to 'searx/search.py')
-rw-r--r--searx/search.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/search.py b/searx/search.py
index 6288a46eb..1bf05f7f9 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -206,6 +206,10 @@ def score_results(results):
# if there is no duplicate found, append result
else:
res['score'] = score
+ # if the result has no scheme, use http as default
+ if res['parsed_url'].scheme == '':
+ res['parsed_url'] = res['parsed_url']._replace(scheme="http")
+
results.append(res)
results = sorted(results, key=itemgetter('score'), reverse=True)