mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	[fix] wikipedia: minor fix: return no result instead of crash in some very few cases.
In few cases, the JSON results doesn't contains the key 'type'.
This commit is contained in:
		
							parent
							
								
									cdceec1cbb
								
							
						
					
					
						commit
						58d51e082d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -52,7 +52,7 @@ def response(resp): | ||||||
|     api_result = loads(resp.text) |     api_result = loads(resp.text) | ||||||
| 
 | 
 | ||||||
|     # skip disambiguation pages |     # skip disambiguation pages | ||||||
|     if api_result['type'] != 'standard': |     if api_result.get('type') != 'standard': | ||||||
|         return [] |         return [] | ||||||
| 
 | 
 | ||||||
|     title = api_result['title'] |     title = api_result['title'] | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Alexandre Flament
						Alexandre Flament