[fix] rewrite scheme to http if there is no one, FIX #390

This commit is contained in:
Thomas Pointhuber 2015-08-24 11:18:58 +02:00
parent 9cec9770be
commit 5bffa9ca33
1 changed files with 4 additions and 0 deletions

View File

@ -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)