o
    i4                     @   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-chaudhry 4d68be11c9f9daf3dab0778ad1e010c37398103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md5	info_dictz'https://audioboom.com/posts/8128496.mp3 e329edf304d450def95c7f86a9165ee1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   only_matchingc                 C   s   |  |}| d| |}| jd|d|dtd}t|dtdp!i }||dp.| d	|d
|dp:| g d||dpJt	|dpJ| 
|t|dpU| d||dpc| g d|d|dpp| jd|ddddS )Nzhttps://audioboom.com/posts/z>data-react-class="V5DetailPagePlayer"\s*data-react-props=["\']z
clip storeF)fataltransform_source)clips    )expected_typeclipURLPriorToLoadingaudioz	audio urlr   )zog:titlezog:audio:titleaudio_titler   formattedDescriptionr   zweibo:audio:durationauthor)zog:audio:artistztwitter:audio:artist_nameaudio_artistr   
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   )	_match_id_download_webpage_search_jsonr   r   dictget_og_search_property_html_search_metar   _og_search_descriptionr   _html_search_regex)selfr   video_idwebpage
clip_storeclip r3   N/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/audioboom.py_real_extract$   s*   


zAudioBoomIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTSr5   r3   r3   r3   r4   r      s:    r   N)commonr   utilsr   r   r   r   r   r3   r3   r3   r4   <module>   s    