o
    i	                     @   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-lemons 4734e5cfdd64a568e837246aa3eaa524z$2f3d0382-ea82-4cdc-958e-84fbadadc710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-name 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| |p7|d}|rCt	
dd||d< t||S )	Nr   zDownloading HD m3u8 information)note)r
   r   r   formats	subtitles
thumbnailsz(/upload)/.+(/angel-app/.+)$z\1\2r   )	_match_id_download_webpage_search_json_ld#_extract_m3u8_formats_and_subtitlespop_og_search_title_og_search_descriptionr   _og_search_thumbnailresubr   )	selfr   video_idwebpagejson_ldr   r   r   base_thumbnail_url r'   J/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/angel.py_real_extract!   s    



zAngelIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTSr)   r'   r'   r'   r(   r      s0    r   )r    commonr   utilsr   r   r   r'   r'   r'   r(   <module>   s    