
    VGh	                     >    d dl ZddlmZ ddlmZmZ  G d de      Zy)    N   )InfoExtractor   )traverse_objupdate_url_queryc                   \    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 Zy)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           
         | j                  |      }| j                  d| |      }t        |d      }t        j                  j                  |      }g }t        |d      }|r%|j                  | j                  ||d|d             t        |d      }|r&|j                  | j                  ||dd	|d
             |D ]  }	t        |	d   |      |	d<    ||j                  d      |j                  d      |j                  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fs
             g/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/screencastify.py_real_extractzScreencastifyIE._real_extract*   s6   >>#&""OPXzZ\df $D*GH%%l3(/BCNN))%xeSX * Z[ (.DENN**$hE5PU]b + de  	9A'%%8AeH	9 XXg&88M2,*6
 	
    N)__name__
__module____qualname__
_VALID_URLstr_TESTSr7    r8   r6   r	   r	      s    ?GJ
 H(E#*-
 V
 M(&5
 V
 M3F<
r8   r	   )urllib.parser(   commonr   utilsr   r   r	   r?   r8   r6   <module>rC      s     ! 2?
m ?
r8   