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   )traverse_objupdate_url_queryc                   @   s^   e Zd ZddgZdddddded	d
diddddddddd
diddddgZdd ZdS )ScreencastifyIEz4https?://watch\.screencastify\.com/v/(?P<id>[^/?#]+)z<https?://app\.screencastify\.com/v[23]/watch/(?P<id>[^/?#]+)z6https://watch.screencastify.com/v/sYVkZip3quLKhHw4Ybk8sYVkZip3quLKhHw4Ybk8mp4z.Inserting and Aligning the Case Top and Bottom z	Paul Gunn)idexttitledescriptionuploaderextra_param_to_segment_urlskip_downloadm3u8)url	info_dictparamsz;https://app.screencastify.com/v3/watch/J5N7H11wofDN1jZUCr3tJ5N7H11wofDN1jZUCr3tzScott PiesenzLesson Recording 1-17 Burrr...)r   r   r   r   r   z;https://app.screencastify.com/v2/watch/BQ26VbUdfbQLhKzkktOkT)r   only_matchingc           
   
   C   s   |  |}| d| |}t|d}tj|}g }t|d}|r/|| j||d|dd t|d}|rD|| j||dd	|dd
 |D ]}	t	|	d ||	d< qF||
d|
d|
d||dS )NzAhttps://umbrella.svc.screencastify.com/api/umbrellaService/watch/)manifestauthquery)r   r   dashF)mpd_idr   fatal)r   hlsUrlr	   hls)r   m3u8_idr   r   r   r   r   userName)r   r   r   r   formatsr   )	_match_id_download_jsonr   urllibparseparse_qsextend_extract_mpd_formats_extract_m3u8_formatsr   get)
selfr   video_idinfoquery_stringr   r"   dash_manifest_urlhls_manifest_urlf r3   R/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/screencastify.py_real_extract*   s<   





zScreencastifyIE._real_extractN)__name__
__module____qualname__
_VALID_URLstr_TESTSr5   r3   r3   r3   r4   r      s<    	r   )urllib.parser%   commonr   utilsr   r   r   r3   r3   r3   r4   <module>   s    