U
    g4                     @   s8   d dl mZ ddlmZmZmZmZ G dd deZdS )   )InfoExtractor   )
clean_htmlfloat_or_nonetraverse_objunescapeHTMLc                   @   sX   e Zd ZdZdddddddd	d
ddddddddddddddddgZdd ZdS )AudioBoomIEz?https?://(?:www\.)?audioboom\.com/(?:boos|posts)/(?P<id>[0-9]+)z1https://audioboom.com/posts/7398103-asim-chaudhryZ 4d68be11c9f9daf3dab0778ad1e010c3Z7398103Zmp3zAsim Chaudhryz$md5:0ed714ae0e81e5d9119cac2f618ad679gGA@z"Sue Perkins: An hour or so with...z4re:https?://(?:www\.)?audioboom\.com/channel/perkins)idexttitledescriptiondurationuploaderuploader_url)urlmd5Z	info_dictz'https://audioboom.com/posts/8128496.mp3Z e329edf304d450def95c7f86a9165ee1Z8128496zTCRNo8 / DAILY 03 - In Controlz$md5:44665f142db74858dfa21c5b34787948gf@z>Lost Dot Podcast: The Trans Pyrenees and Transcontinental Racez5re:https?://(?:www\.)?audioboom\.com/channels/5003904z?https://audioboom.com/posts/4279833-3-09-2016-czaban-hour-3?t=0T)r   Zonly_matchingc                 C   s   |  |}| d| |}| jd|d|dtd}t|dtdpBi }||dp\| d	|d
|dpv| dddg||dpt	|dp| 
|t|dp| d||dp| dddg|d|dp| jd|ddddS )Nzhttps://audioboom.com/posts/z>data-react-class="V5DetailPagePlayer"\s*data-react-props=["\']z
clip storeF)fatalZtransform_source)Zclips    )Zexpected_typeZclipURLPriorToLoadingaudioz	audio urlr   zog:titlezog:audio:titleZaudio_titler   ZformattedDescriptionr   zweibo:audio:durationauthorzog:audio:artistztwitter:audio:artist_nameZaudio_artistr   Z
author_urlzJ<div class="avatar flex-shrink-0">\s*<a href="(?P<uploader_url>http[^"]+)"zuploader url)r   )r	   r   r   r   r   r   r   )Z	_match_idZ_download_webpageZ_search_jsonr   r   dictgetZ_og_search_propertyZ_html_search_metar   Z_og_search_descriptionr   Z_html_search_regex)selfr   Zvideo_idZwebpageZ
clip_storeZclip r   >/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/audioboom.py_real_extract$   s:    
        zAudioBoomIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr   r   r   r   r   r      s8   r   N)commonr   utilsr   r   r   r   r   r   r   r   r   <module>   s   