@@ -143,6 +143,10 @@ def score_results(results):
143143
144144 res['parsed_url'] = urlparse(res['url'])
145145
146+ # if the result has no scheme, use http as default
147+ if not res['parsed_url'].scheme:
148+ res['parsed_url'] = res['parsed_url']._replace(scheme="http")
149+
146150 res['host'] = res['parsed_url'].netloc
147151
148152 if res['host'].startswith('www.'):
@@ -206,9 +210,6 @@ def score_results(results):
206210 # if there is no duplicate found, append result
207211 else:
208212 res['score'] = score
209− # if the result has no scheme, use http as default
210− if res['parsed_url'].scheme == '':
211− res['parsed_url'] = res['parsed_url']._replace(scheme="http")
212213
213214 results.append(res)
214215