U
    g                     @   s,   d dl mZ ddlmZ G dd deZdS )   )InfoExtractor   )
remove_endc                
   @   sR   e Zd ZdZdddddddd	d
digiddddddddgZdZdd ZdS )CharlieRoseIEzNhttps?://(?:www\.)?charlierose\.com/(?:video|episode)(?:s|/player)/(?P<id>\d+)z$https://charlierose.com/videos/27996Z fda41d49e67d4ce7c2411fd2c4702e09Z27996Zmp4zRemembering Zaha Hadidzre:^https?://.*\.jpg\?\d+z_We revisit past conversations with Zaha Hadid, in memory of the world renowned Iraqi architect.enextZvtt)idr   title	thumbnaildescriptionZ	subtitles)urlmd5	info_dictT)r   Zonly_matchingz4https://charlierose.com/episodes/30887?autoplay=truez'https://charlierose.com/video/player/%sc                 C   sz   |  |}| | j| |}t| |d}| j| j| ||ddd }| |d  |||| || 	|d |S )Nz - Charlie RoseZm3u8_native)Zm3u8_entry_protocol    formats)r   r	   r
   r   )
Z	_match_idZ_download_webpage_PLAYER_BASEr   Z_og_search_titleZ_parse_html5_media_entriesZ_remove_duplicate_formatsupdateZ_og_search_thumbnailZ_og_search_description)selfr   Zvideo_idZwebpager	   r    r   @/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/charlierose.py_real_extract    s&    
  zCharlieRoseIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr   r   r   r   r   r   r      s0    r   N)commonr   utilsr   r   r   r   r   r   <module>   s   