o
    i                     @   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   )parse_age_limitparse_durationtraverse_objurl_or_nonec                   @   s   e Zd ZdZdddddddd	d
dgdd
ddidddddddddd
dgdd
ddidddddddddd
dddidddd gZd!d" Zd#S )$MzaaloIEzi(?i)https?://(?:www\.)?mzaalo\.com/(?:play|watch)/(?P<type>movie|original|clip)/(?P<id>[a-f0-9-]+)/[\w-]+zLhttps://www.mzaalo.com/play/movie/c0958d9f-f90e-4503-a755-44358758921d/Jamunz$c0958d9f-f90e-4503-a755-44358758921dJamunmp4z$md5:24fe9ebb9bbe5b36f7b54b90ab1e2f31zcount:15zre:^https?://.*\.jpg$g     @hinDrama   )
idtitleextdescription
thumbnails	thumbnaildurationlanguage
categories	age_limitskip_downloadm3u8)url	info_dictparamszhttps://www.mzaalo.com/play/original/93d42b2b-f373-4c2d-bca4-997412cb069d/Modi-Season-2-CM-TO-PM/Episode-1:Decision,-Not-Promisesz$93d42b2b-f373-4c2d-bca4-997412cb069dz Episode 1:Decision, Not Promisesz$md5:16f76058432a54774fbb2561a1955652zcount:22g     @zXhttps://www.mzaalo.com/play/clip/83cdbcb5-400a-42f1-a1d2-459053cfbda5/Manto-Ki-Kahaaniyaz$83cdbcb5-400a-42f1-a1d2-459053cfbda5zManto Ki Kahaaniyaz$md5:c3c5f1d05f0fd1bfcb05b673d1cc9f2fzcount:3g     D@)r   r   r   r   r   r   r   r   zOhttps://mzaalo.com/watch/MOVIE/389c892d-0b65-4019-bf73-d4edcb1c014f/Chalo-DilliT)r   only_matchingc                 C   s  |  |dd\}}|dkrd| dn	d|  d| }| jd| |d	d
idd }| |d |}i }t|dtjhdfD ]\}}	t|	rR|	ddg||< qBt|dt	j
hf}
|D ]}|
|d< q^|||dt|dt	hfdt	hfdthfdthfdddthifddt	hfdS )Nr   typeclipzpartner/streamurl?&assetId=z&getClipDetails=YESz api/v2/player/details?assetType=z	&assetId=z'https://production.mzaalo.com/platform/zOcp-Apim-Subscription-Key 1d0caac2702049b89a305929fdf4cbae)headersdata	streamURL	subtitles.vtt)r   r   r   )r   formatsr$   r   r   r   maturity_ratingimagesr   genre)r   r   r   r   r   r   )_match_valid_urlgroupupper_download_json_extract_m3u8_formatsr   dictitemsr   strlowerr   r   )selfr   video_idtype_pathr"   r&   r$   	subs_langsubs_urllangf r;   K/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/mzaalo.py_real_extract?   sB   


zMzaaloIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTSr=   r;   r;   r;   r<   r   
   s^    
3r   N)commonr   utilsr   r   r   r   r   r;   r;   r;   r<   <module>   s    