mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-04 03:27:06 -05: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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user