mirror of
https://github.com/searxng/searxng.git
synced 2024-12-04 16:36:27 +00:00
[fix] rewrite scheme to http if there is no one, FIX #390
This commit is contained in:
parent
9cec9770be
commit
5bffa9ca33
1 changed files with 4 additions and 0 deletions
|
@ -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 a new issue