
    Ği                     b    d dl Z d dlZddlmZ ddlmZmZmZmZ ddl	m
Z
  G d de          ZdS )	    N   )InfoExtractor   )int_or_nonejoin_nonemptymimetype2exturl_or_none)traverse_objc                   
   e Zd Zg dZdd                    e           dZddddd	d
ddddg dddd	ddiddddddddg dddd	ddiddddddd dg d!d"dd	ddidd#ddd$ddd%ddd&ddd'ddd(ddd)ddgZd* Zd+ Zd,S )-	VidflexIE)z[^.]+\.vidflex\.tvz(?:www\.)?acactv\.caz (?:www\.)?albertalacrossetv\.comz(?:www\.)?cjfltv\.comz"(?:www\.)?figureitoutbaseball\.comz(?:www\.)?ocaalive\.comz(?:www\.)?pegasussports\.tvz(?:www\.)?praxisseries\.caz(?:www\.)?silenticetv\.comz(?:www\.)?tuffhedemantv\.comz(?:www\.)?watchfuntv\.comzlive\.ofsaa\.on\.caztv\.procoro\.caztv\.realcastmedia\.netztv\.fringetheatre\.cazvideo\.haisla\.cazvideo\.hockeycanada\.cazvideo\.huuayaht\.orgzvideo\.turningpointensemble\.cazvideos\.livingworks\.netz'videos\.telusworldofscienceedmonton\.cazwatch\.binghamtonbulldogs\.comzwatch\.rekindle\.tvzwatch\.wpca\.comzhttps?://(?:|z.)/[a-z]{2}(?:-[a-z]{2})?/c/[\w-]+\.(?P<id>\d+)zLhttps://video.hockeycanada.ca/en/c/nwt-micd-up-with-jamie-lee-rattray.107486T)urlonly_matchingzOhttps://video.hockeycanada.ca/en-us/c/nwt-micd-up-with-jamie-lee-rattray.107486107486u&   NWT: Mic’d up with Jamie Lee Rattraymp4s   i	ia20211015)English2021zNational Women's Teamz$md5:efb1cf6165b48cc3f5555c4262dd5b23z@re:^https?://wpmedia01-a\.akamaihd\.net/en/asset/public/image/.+)	idtitleextduration	timestampupload_datetagsdescription	thumbnailskip_download)r   	info_dictparamszOhttps://video.hockeycanada.ca/en/c/mwc-remembering-the-wild-ride-in-riga.112307112307z&MWC: Remembering the wild ride in RigaiB  iWKf20240520)r   2024National Men's TeamIIHF World ChampionshipFanu'   re:.+Canada’s National Men’s Team.+zThttps://video.hockeycanada.ca/fr/c/cmm-retour-sur-un-parcours-endiable-a-riga.112304112304u.   CMM : Retour sur un parcours endiablé à RigaiKf)Frenchr$   r%   r&   r'   z$md5:cf825222882a3dab1cd62cffcf3b4d1fz9https://myfbcgreenville.vidflex.tv/en/c/may-12th-2024.658zrhttps://www.figureitoutbaseball.com/en/c/fiob-podcast-14-dan-bertolini-ncaa-d1-head-coach-recorded-11-29-2018.1367zUhttps://videos.telusworldofscienceedmonton.ca/en/c/the-aurora-project-timelapse-4.577zQhttps://www.tuffhedemantv.com/en/c/2022-tuff-hedeman-tour-hobbs-nm-january-22.227zJhttps://www.albertalacrossetv.com/en/c/up-floor-ground-balls-one-more.3449zShttps://www.silenticetv.com/en/c/jp-unlocked-day-in-the-life-of-langley-ha-15u.5197zOhttps://jphl.vidflex.tv/en/c/jp-unlocked-day-in-the-life-of-langley-ha-15u.5197c                    |                      |          }|                     ||          }|                     d|dd          }t          |                     ||          dt
          j        ht          j        ht          j
        ht          hf          }|t          |                     ||                    d|                     |                    dd                              d	d          |          S )
Nz6content_api:\s*(["\'])(?P<url>https?://(?:(?!\1).)+)\1zcontent api urlr   )groupconfig)r   formatsz/*<![CDATA[*/ z/*]]>*/)	_match_id_download_webpage_html_search_regexr
   _download_jsonbase64	b64decodebytesdecodejsonloadsdictlist_yield_formats_search_json_ldreplace)selfr   video_idwebpagedata_urlmedia_configs         ]C:\Users\betacode\Desktop\descargarYoutube\venv\Lib\site-packages\yt_dlp/extractor/vidflex.py_real_extractzVidflexIE._real_extractp   s    >>#&&((h77**EwPain + p p#(33()EL>DJ<$PR R
 D//hGGHH
 
 ""44<<YKKXW W
 	
    c              #   n  K   t          |ddd f          D ]}|d         }t          |                    d                    }|dk    r |                     ||dd	          E d {V  R|d
k    r>|                     d|dd           }t          d|          |d
t          |          dV  ||dV  d S )Nmediasourcec                 ,    t          |d                   S )Nsrc)r	   )_vs     rC   <lambda>z*VidflexIE._yield_formats.<locals>.<lambda>   s    XcdefkdlXmXm rE   rJ   typem3u8Fhls)fatalm3u8_idr   z_(\d+)k\.mp4bitrate)defaulthttp)	format_idr   r   tbr)r   r   )r
   r   get_extract_m3u8_formats_search_regexr   r   )r>   rB   r?   media_source	media_url
media_typerS   s          rC   r;   zVidflexIE._yield_formats   s"     (KmKm7noo 	 	L$U+I%l&6&6v&>&>??JV##55iQV`e5ffffffffffu$$,,_i\`,aa!.vw!?!?$ &w//	      %%     	 	rE   N)	__name__
__module____qualname___DOMAINS_REjoin
_VALID_URL_TESTSrD   r;    rE   rC   r   r      s         K4 k+!6!6jjjJ] 
 a=#%@@@A\

 

 #D)   a=#%```E\

 

 #D)   fE#%___A\

 

 #D)   K  D  g  c  \  e  a CDFL
 
 
"    rE   r   )r3   r7   commonr   utilsr   r   r   r	   utils.traversalr
   r   re   rE   rC   <module>ri      s      ! ! ! ! ! !            + * * * * *F F F F F F F F F FrE   