U
    g/                     @   s0   d dl mZ ddlmZmZ G dd deZdS )   )InfoExtractor   )	qualitiesstr_or_nonec                	   @   s4   e Zd ZdZdddddddd	d
dgZdd ZdS )ReverbNationIEz=https?://(?:www\.)?reverbnation\.com/.*?/song/(?P<id>\d+).*?$z=http://www.reverbnation.com/alkilados/song/16965047-mona-lisaZ c0aaf339bcee189495fdf5a8c8ba8645Z16965047mp3z	MONA LISAZ	ALKILADOSZ216429zre:^https?://.*\.jpg)idexttitleuploaderuploader_id	thumbnail)urlmd5Z	info_dictc              	   C   s   |  |}| jd| |d| d}d}t|}g }|D ]&}||r:||| ||d q:||d |d |di dt|di d	|d
ddS )Nz"https://api.reverbnation.com/song/z Downloading information of song )Znote)r   image)r   Z
preferencenamer   Zartistr   r   none)r   r
   r   r   r   
thumbnailsr	   Zvcodec)Z	_match_idZ_download_jsonr   getappendr   )selfr   Zsong_idZapi_resZ
THUMBNAILSZqualityr   Z	thumb_key r   A/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/reverbnation.py_real_extract   s0    


zReverbNationIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr   r   r   r   r   r      s   r   N)commonr   utilsr   r   r   r   r   r   r   <module>   s   