forked from zaclys/searxng
[fix] rewrite scheme to http if there is no one, FIX #390
This commit is contained in:
parent
9cec9770be
commit
5bffa9ca33
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user