mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-04 03:27:06 -05:00 
			
		
		
		
	don't raise error when nothing was found
This commit is contained in:
		
							parent
							
								
									8c318562e2
								
							
						
					
					
						commit
						e64cca8c3f
					
				@ -82,12 +82,17 @@ def request(query, params):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    params["url"] = url.format(query=quote(query), lang=params["language"])
 | 
					    params["url"] = url.format(query=quote(query), lang=params["language"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    params["raise_for_httperror"] = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return params
 | 
					    return params
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def response(resp):
 | 
					def response(resp):
 | 
				
			||||||
    results = []
 | 
					    results = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if resp.status_code == 404:
 | 
				
			||||||
 | 
					        return []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    result = loads(resp.text)
 | 
					    result = loads(resp.text)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    current = result["current_condition"][0]
 | 
					    current = result["current_condition"][0]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user