
    iP                     J    d Z ddlmZ dddddddZd	gZd
ZdZedz   Zd Zd Z	y)zYandex Music

.. _Countries where Yandex.Music is available: https://yandex.com/support/music/access.html

.. hint::

   Access to music is limited to a few countries: `Countries where Yandex.Music
   is available`_

    )	urlencodezhttps://music.yandex.ruQ4537983NFJSON)websitewikidata_idofficial_api_documentationuse_official_apirequire_api_keyresultsmusicTz/handlers/music-search.jsxc                 L    | |d   dz
  d}t         dz   t        |      z   |d<   |S )Npageno   )textpage?url)
search_urlr   )queryparamsargss      +/root/searxng/searx/engines/yandex_music.pyrequestr   #   s2    6(#3a#78D$y6F5MM    c                 H   g }| j                         }|j                  di       j                  dg       D ]j  }|d   dk(  s|d   }|d   d   d   }|j                  t         d| d	| |d
   d|d   d   d
    d|d   d   d    d|d
    t         d| d| d       l |S )Ntracksitemstyper   idalbumsr   z/album/z/track/title[z] artistsnamez - z/iframe/track//)r   r!   content
iframe_src)jsongetappendr   )respr   
search_resresulttrack_idalbum_ids         r   responser0   +   s    GJ ..2.227B? &>W$d|Hh'*40H NN!U'(78*E#G_!"6(#3A#6w#?"@6)CTUVCWX^C_B``cdjkrdsctu%(Ez8*"M	 Nr   )
__doc__urllib.parser   about
categoriespagingr   r   r   r0    r   r   <module>r7      sT   	 # )"&	 Y
	  //
r   