mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	
						commit
						bb47ea2455
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		|  | @ -74,8 +74,17 @@ def response(resp): | ||||||
|     for result in search_results[0].get('items', []): |     for result in search_results[0].get('items', []): | ||||||
|         # parse image results |         # parse image results | ||||||
|         if result.get('image'): |         if result.get('image'): | ||||||
|  | 
 | ||||||
|  |             result_url = '' | ||||||
|  |             if 'url' in result: | ||||||
|  |                 result_url = result['url'] | ||||||
|  |             elif 'link' in result: | ||||||
|  |                 result_url = result['link'] | ||||||
|  |             else: | ||||||
|  |                 continue | ||||||
|  | 
 | ||||||
|             # append result |             # append result | ||||||
|             results.append({'url': result['url'], |             results.append({'url': result_url, | ||||||
|                             'title': result['title'], |                             'title': result['title'], | ||||||
|                             'content': '', |                             'content': '', | ||||||
|                             'img_src': result['image'], |                             'img_src': result['image'], | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Adam Tauber
						Adam Tauber