
    i                     <    d Z ddlmZ ddddddZd	d
gZdZd Zd Zy)zSselfh.st/icons - A collection of logos for self-hosted dashboards and
documentation    )parserzhttps://selfh.st/icons/zhttps://selfh.st/icons-about/TFJSON)websiteofficial_api_documentationuse_official_apirequire_api_keyresultsimagesiconsz)https://cdn.jsdelivr.net/gh/selfhst/iconsc                 (    t          d|d<   | |d<   |S )Nz/index.jsonurlquery)cdn_base_url)r   paramss     &/root/searxng/searx/engines/selfhst.pyrequestr      s     #nK0F5MF7OM    c                    g }| j                   d   j                         j                  d      }| j                         D ]  }|d   j                         t	        fd|D              s+d }dD ]  }||   dk(  s|j                         } n t
         d| d|d    d| }d	||d
   d||t        j                  |d         d}|j                  |        |S )Nr    	Referencec              3   &   K   | ]  }|v  
 y w)N ).0
query_partkeywords     r   	<genexpr>zresponse.<locals>.<genexpr>    s     GZ:(Gs   )SVGPNGWebPYes/.zimages.htmlName 	CreatedAt)templater   titlecontentimg_src
img_formatpublishedDate)	search_paramslowersplitjsonanyr   r   parseappend)	respr	   query_partsitemr*   format_namer)   resultr   s	           @r   responser8      s    G$$W-335;;C@K		 {#))+G;GG
1 	KK E)(..0
	
 "N!J<qk1B0C1ZLQ%&\$#\\${*;<
 	v+. Nr   N)__doc__dateutilr   about
categoriesr   r   r8   r   r   r   <module>r=      sD     )"A	  
 ;r   