o
    i                     @   s<   d dl mZ d dlmZ ddlmZmZ G dd deZdS )   )YoutubeTabBaseInfoExtractor)	YoutubeIE   )ExtractorErrortraverse_objc                   @   s   e Zd ZdZdZdi dddddd	d
dddddddddgdddddddddedddd d!d"d#d$d%dd&d'ed(ed)ed*d+d,d-gZd.d/ Zd0S )1YoutubeClipIEzyoutube:clipz4https?://(?:www\.)?youtube\.com/clip/(?P<id>[^/?#]+)z7https://www.youtube.com/clip/UgytZKpehg-hEMBSn3F4AaABCQidzUgytZKpehg-hEMBSn3F4AaABCQextmp4section_startg      =@section_endgC@durationgffffff%@	age_limit    availabilitypublic
categoriesGamingchannelzScott The Woz
channel_idUC4rqhyiTs7XyuODcECvuiiQchannel_urlz8https://www.youtube.com/channel/UC4rqhyiTs7XyuODcECvuiiQdescriptionz$md5:7a4517a17ea9b4bd98996399d8bb36e7
like_countplayable_in_embedTtagszcount:17	thumbnailz:https://i.ytimg.com/vi_webp/ScPX26pdQik/maxresdefault.webptitlez'Mobile Games on Console - Scott The Woz20210920z@ScottTheWozz$https://www.youtube.com/@ScottTheWoznot_livezcount:20z	count:100clip)upload_dateuploaderuploader_iduploader_url
view_countlive_statuschannel_follower_countchapterscomment_countheatmap
media_type)url	info_dictc              	   C   sv   |  |}| ||\}}t|d}|stdt|ddd}dd| t |dt|d	 d
 t|d d
 ddS )N)currentVideoEndpointwatchEndpointvideoIdzUnable to find video ID)engagementPanels."engagementPanelSectionListRenderercontentclipSectionRenderercontents.clipAttributionRendereronScrubExitcommandExecutorCommandcommands.openPopupActionpopupnotificationActionRendereractionButtonbuttonRenderercommandr8   r9   .loopCommandF)get_allurl_transparentz https://www.youtube.com/watch?v=r    startTimeMsi  	endTimeMs)
zproto:httpsqualityresfpszhdr:12sourcevcodecchannelsacodeclang)_typer,   ie_keyr   r+   r   r   _format_sort_fields)	_match_id_extract_webpager   r   r   rN   int)selfr,   clip_id_datavideo_id	clip_data rY   R/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/youtube/_clip.py_real_extract,   s"   

zYoutubeClipIE._real_extractN)__name__
__module____qualname__IE_NAME
_VALID_URLrR   _TESTSr[   rY   rY   rY   rZ   r      sj    	
#r   N)_tabr   _videor   utilsr   r   r   rY   rY   rY   rZ   <module>   s    