U
    g	                     @   s8   d dl Z ddlmZ ddlmZmZ G dd deZdS )    N   )InfoExtractor   )merge_dictsurl_or_nonec                
   @   sL   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gZdd ZdS )AngelIEzhttps?://(?:www\.)?angel\.com/watch/(?P<series>[^/?#]+)/episode/(?P<id>[\w-]+)/season-(?P<season_number>\d+)/episode-(?P<episode_number>\d+)/(?P<title>[^/?#]+)zhttps://www.angel.com/watch/tuttle-twins/episode/2f3d0382-ea82-4cdc-958e-84fbadadc710/season-1/episode-1/when-laws-give-you-lemonsZ 4734e5cfdd64a568e837246aa3eaa524z$2f3d0382-ea82-4cdc-958e-84fbadadc710Zmp4z;Tuttle Twins Season 1, Episode 1: When Laws Give You Lemonsz$md5:73b704897c20ab59c433a9c0a8202d5ez?re:^https?://images.angelstudios.com/image/upload/angel-app/.*$g     <@)idexttitledescription	thumbnailduration)urlmd5	info_dictzhttps://www.angel.com/watch/the-chosen/episode/8dfb714d-bca5-4812-8125-24fb9514cd10/season-1/episode-1/i-have-called-you-by-nameZ e4774bad0a5f0ad2e90d175cafdb797dz$8dfb714d-bca5-4812-8125-24fb9514cd10z9The Chosen Season 1, Episode 1: I Have Called You By Namez$md5:aadfb4827a94415de5ff6426e6dee3beg     @c           	      C   s   |  |}| ||}| ||}| j|d|dd\}}|| || |||d}t| |pn|d}|rt	
dd||d< t||S )	Nr   zDownloading HD m3u8 information)Znote)r   r
   r   formats	subtitlesZ
thumbnailsz(/upload)/.+(/angel-app/.+)$z\1\2r   )Z	_match_idZ_download_webpageZ_search_json_ldZ#_extract_m3u8_formats_and_subtitlespopZ_og_search_titleZ_og_search_descriptionr   Z_og_search_thumbnailresubr   )	selfr   Zvideo_idZwebpageZjson_ldr   r   r   Zbase_thumbnail_url r   :/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/angel.py_real_extract!   s$    
  

zAngelIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr   r   r   r   r   r      s.   r   )r   commonr   utilsr   r   r   r   r   r   r   <module>   s   