mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-03 19:17:07 -05:00 
			
		
		
		
	[fix] #121, HTTP 500 Error if res["content"] == None
This commit is contained in:
		
							parent
							
								
									58cc03351a
								
							
						
					
					
						commit
						5a7f85ecee
					
				@ -131,7 +131,7 @@ def score_results(results):
 | 
				
			|||||||
        weight = 1.0
 | 
					        weight = 1.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # strip multiple spaces and cariage returns from content
 | 
					        # strip multiple spaces and cariage returns from content
 | 
				
			||||||
        if 'content' in res:
 | 
					        if res.get('content'):
 | 
				
			||||||
            res['content'] = re.sub(' +', ' ',
 | 
					            res['content'] = re.sub(' +', ' ',
 | 
				
			||||||
                                    res['content'].strip().replace('\n', ''))
 | 
					                                    res['content'].strip().replace('\n', ''))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user