mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
[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
|
# if there is no duplicate found, append result
|
||||||
else:
|
else:
|
||||||
res['score'] = score
|
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.append(res)
|
||||||
|
|
||||||
results = sorted(results, key=itemgetter('score'), reverse=True)
|
results = sorted(results, key=itemgetter('score'), reverse=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user