U
    g                     @   s0   d dl mZ ddlmZmZ G dd deZdS )   )InfoExtractor   )int_or_nonemerge_dictsc                   @   sR   e Zd ZdZdddddedeedd	d
ddeddddddddgZdd ZdS )AitubeKZVideoIEzBhttps?://aitube\.kz/(?:video|embed/)\?(?:[^\?]+)?id=(?P<id>[\w-]+)zxhttps://aitube.kz/video?id=9291d29b-c038-49a1-ad42-3da2051d353c&playlistId=d55b1f5f-ef2a-4f23-b646-2a86275b86b7&season=1z$9291d29b-c038-49a1-ad42-3da2051d353cZmp4g     @z$94962f73-013b-432c-8853-1bd78ca860fez	ASTANA TVu   Смотреть любимые сериалы и видео, поделиться видео и сериалами с друзьями и близкимиzihttps://cdn.static02.aitube.kz/kz.aitudala.aitube.staticaccess/files/ddf2a2ff-bee3-409b-b5f2-2a8202bba75bZ20221102ibcu*   Ангел хранитель 1 серия)idextduration
channel_id
like_countchannelcomment_count
view_countdescription	thumbnailZupload_date	timestamptitlechannel_follower_count)urlZ	info_dictz@https://aitube.kz/embed/?id=9291d29b-c038-49a1-ad42-3da2051d353cT)r   Zonly_matchingzxhttps://aitube.kz/video?season=1&id=9291d29b-c038-49a1-ad42-3da2051d353c&playlistId=d55b1f5f-ef2a-4f23-b646-2a86275b86b7c                 C   s   |  |}| ||}| ||d d d }| ||}| d| d|\}}t||dpn| ddg||d	|||d
pt| d||d|d|d|d|dt|dd|S )NpropsZ	pagePropsZ	videoInfozAhttps://api-http.aitube.kz/kz.aitudala.aitube.staticaccess/video/z/videor   namezog:titler   Z	viewCountzya:ovs:views_totalZ	likeCountZchannelTitleZ	channelIdZcoverUrlZcommentCountZchannelSubscriberCount)r   r   r   formats	subtitlesr   r   r   r
   r   r   r   )	Z	_match_idZ_download_webpageZ_search_nextjs_dataZ_search_json_ldZ#_extract_m3u8_formats_and_subtitlesr   getZ_html_search_metar   )selfr   Zvideo_idZwebpageZnextjs_dataZjson_ld_datar   r    r   ;/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/aitube.py_real_extract$   s2    

 
zAitubeKZVideoIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLintZ_TESTSr   r   r   r   r   r      s4   r   N)commonr   utilsr   r   r   r   r   r   r   <module>   s   