
    VGhr	                     >    d dl mZ ddlmZmZmZmZ  G d de      Zy)   )InfoExtractor   )ExtractorErrortraverse_objunified_timestampurl_or_nonec            	       D    e Zd ZdZdddddddd	d
ddidgZdZddiZd Zy)ClipchampIEz6https?://(?:www\.)?clipchamp\.com/watch/(?P<id>[\w-]+)z'https://clipchamp.com/watch/gRXZ4ZhdDaUgRXZ4ZhdDaUmp4zUntitled videozAlexander Schwartzi/d20230406zre:^https?://.+\.jpg)idexttitleuploader	timestampupload_date	thumbnailskip_downloadm3u8)url	info_dictparamsz4https://%s.cloudflarestream.com/%s/manifest/video.%sparentOriginzhttps://clipchamp.comc           
         | j                  |      }| j                  ||      }| j                  ||      d   d   d   }|j                  d      }|dk7  rt	        d| d      |d   }| j                  d	| |d
      }| j                  d|dd      xs d}| j                  | j                  ||dfz  || j                  dd      }	|	j                  | j                  | j                  ||dfz  |d| j                  dd             ||	dj                  t        |ddt        hf            xs d dt        |ddt        hfdt        hfdt        hfd      S ) Nprops	pagePropsvideostorage_location	cf_streamz#Unsupported clip storage location ""download_urlz$https://iframe.cloudflarestream.com/zDownloading player iframez+\bcustomer-domain-prefix=["\']([\w-]+)["\']	subdomainF)fatalzcustomer-2ut9yn3y6fta1yxempddash)queryr$   mpd_idr   r   hls)r'   r$   m3u8_id creator)
first_name	last_name)r   formatsr   projectproject_name
created_atthumbnail_url)r   r   r   )	_match_id_download_webpage_search_nextjs_datagetr   _search_regex_extract_mpd_formats_STREAM_URL_TMPL_STREAM_URL_QUERYextend_extract_m3u8_formatsjoinr   strr   r   )
selfr   video_idwebpagedatar   pathiframer#   r/   s
             c/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/clipchamp.py_real_extractzClipchampIE._real_extract   s   >>#&((h7'':7CKPQXY88$67{* #FGWFXXY!Z[[N#''24&98E`b&&:Fu ' & E)D 	 ++!!Ye$<<h((f , F 	t11!!Yf$==x((u 2 F 	G
 dY@[^a]b4c!demim	
 4#^cU;*->,?@-}=" 		
 		
    N)__name__
__module____qualname__
_VALID_URL_TESTSr:   r;   rG    rH   rF   r
   r
   
   sT    JJ8%,#%0
 #F+ F N')@A 
rH   r
   N)commonr   utilsr   r   r   r   r
   rN   rH   rF   <module>rQ      s    ! 3
- 3
rH   