
    Ği                     z    d dl Z ddlmZ ddlmZ  G d de          Z G d de          Z G d	 d
e          ZdS )    N   )AMPIE)InfoExtractorc                       e Zd ZdZdZdZdddddd	d
dddddiddddddd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*d+dd!d,d#d-d.d/d0d.d/gZed1             Zd2 Z	d3S )4	FoxNewsIEfoxnewszFox News and Fox Business Videozfhttps?://video\.(?:insider\.)?fox(?:news|business)\.com/v/(?:video-embed\.html\?video_id=)?(?P<id>\d+)z)https://video.foxnews.com/v/63206538361126320653836112mp4z>Tucker Carlson joins 'Gutfeld!' to discuss his new documentaryre:^https?://.*\.jpg$i  20230217z$md5:858a8a36f59e9ca897d758855bcdfa02g   A)idexttitle	thumbnaildurationupload_datedescription	timestampskip_downloadm3u8url	info_dictparamsaE  http://video.insider.foxnews.com/v/video-embed.html?video_id=5099377331001&autoplay=true&share_url=http://insider.foxnews.com/2016/08/25/univ-wisconsin-student-group-pushing-silence-certain-words&share_title=Student%20Group:%20Saying%20%27Politically%20Correct,%27%20%27Trash%27%20and%20%27Lame%27%20Is%20Offensive&share=true509937733100182416_censoring20160826g   Ai	  )r   r   r   r   r   r   r   r   z@http://video.foxnews.com/v/3937480/frozen-in-time/#sp=show-clips 32aaded6ba3ef0d1c04e238d01031e5e3937480flvzFrozen in Timez#16-year-old girl is size of toddleri	  icM20110503)r   r   r   r   r   r   r   r   404 page)r   md5r   skipzqhttp://video.foxnews.com/v/3922535568001/rep-luis-gutierrez-on-if-obamas-immigration-plan-is-legal/#sp=show-clips 5846c64a1ea05ec78175421b8323e2df3922535568001z;Rep. Luis Gutierrez on if Obama's immigration plan is legalz&Congressman discusses president's plani$  i_T20141204z"m3u8 HTTP error 400 in web browserzPhttp://video.foxnews.com/v/video-embed.html?video_id=3937480&d=video.foxnews.comTr   only_matchingz,http://video.foxbusiness.com/v/4442309889001c              #   n   K   t          j        d|          D ]}d|                    d           V  d S )Nz(?x)
                    <(?:script|(?:amp-)?iframe)[^>]+\bsrc=["\']
                    (?:https?:)?//video\.foxnews\.com/v/(?:video-embed\.html|embed\.js)\?
                    (?:[^>"\']+&)?(?:video_)?id=(?P<video_id>\d+)
                z6https://video.foxnews.com/v/video-embed.html?video_id=video_id)refinditergroup)clsr   webpagemobjs       ]C:\Users\betacode\Desktop\descargarYoutube\venv\Lib\site-packages\yt_dlp/extractor/foxnews.py_extract_embed_urlszFoxNewsIE._extract_embed_urlsQ   s`      K   	d 	dD d4::V`KaKacccccc	d 	d    c                 p    |                      |          }|                     d| d|           }||d<   |S )Nz(https://api.foxnews.com/v3/video-player/z?callback=uid_r   )	_match_id_extract_feed_info)selfr   r+   infos       r2   _real_extractzFoxNewsIE._real_extract[   sK    >>#&&&&YxYYxYY[ [T
r4   N)
__name__
__module____qualname__IE_NAMEIE_DESC
_VALID_URL_TESTSclassmethodr3   r:    r4   r2   r   r      sk       G/GzJ ?%[5)E)	 	 '/	
 	
  [%*0))5	 	 '/	
 	
  V5)D')5	 	 	
 	
  G5%VG')5	 	 9	
 	
  f!	
 	

 B!	
 	
ADFL d d [d    r4   r   c                   X    e Zd ZdZdddddddd	d
dddidddddddddddddgZd ZdS )FoxNewsVideoIEz1https?://(?:www\.)?foxnews\.com/video/(?P<id>\d+)z+https://www.foxnews.com/video/63286322861126328632286112r
   zReview: 2023 Toyota Prius Prime   zre:^https://.+\.jpg$g  @A20230602z$md5:b69aafb125b41c1402e9744f53d6edc4)r   r   r   r   r   r   r   r   r   r   r   z+https://www.foxnews.com/video/63130586641126313058664112z're:https://.+/1280x720/match/image\.jpg20220930z"New York City, Kids Therapy, Bidenio	  z!Gutfeld! - Thursday, September 29i6c)r   r   r   r   r   r   r   r   r"   r   r   r$   c                 j    |                      |          }|                     d| t          |          S )Nzhttps://video.foxnews.com/v/)r6   
url_resultr   )r8   r   r+   s      r2   r:   zFoxNewsVideoIE._real_extract   s3    >>#&&HhHH)U]^^^r4   N)r;   r<   r=   r@   rA   r:   rC   r4   r2   rE   rE   d   s        EJ<!60%%A	
 	
 #F+  =!C%?8#	
 	
  F8_ _ _ _ _r4   rE   c                   f    e Zd ZdZdZddddddd	d
dddddiddddddddddddddddgZd Zd S )!FoxNewsArticleIEzKhttps?://(?:www\.)?(?:insider\.)?foxnews\.com/(?!v)([^/]+/)+(?P<id>[a-z-]+)zfoxnews:articlezqhttps://www.foxnews.com/politics/2016/09/08/buzz-about-bud-clinton-camp-denies-claims-wore-earpiece-at-forum.html d2dd6ce809cedeefa96460e9648214375116295019001r
   z7Trump and Clinton asked to defend positions on Iraq Warz\Veterans and Fox News host Dana Perino react on 'The Kelly File' to NBC's presidential forumi5W20160908r   i  )r   r   r   r   r   r   r   r   r   r   )r   r#   r   r   zhttps://www.foxnews.com/us/2018/03/09/parkland-survivor-kyle-kashuv-on-meeting-trump-his-app-to-prevent-another-school-shooting.amp.html?__twitter_impression=true5748266721001r    z<Kyle Kashuv has a positive message for the Trump White Housez;Marjory Stoneman Douglas student disagrees with classmates.   inZ20180309)r   r   r   r   r   r   r   r   r"   rK   z`http://insider.foxnews.com/2016/08/25/univ-wisconsin-student-group-pushing-silence-certain-wordsTr(   c                    |                      |          }|                     ||          }|                     d|ddd           }|r0|                     d|z   t                                                    S |                     t          t                              ||                    t                                                    S )Nz&data-video-id=([\'"])(?P<id>[^\'"]+)\1zvideo IDr   )r.   defaultzhttp://video.foxnews.com/v/)r6   _download_webpage_html_search_regexrM   r   ie_keynextr3   )r8   r   
display_idr0   r+   s        r2   r:   zFoxNewsArticleIE._real_extract   s    ^^C((
((j99**5ZtT + ; ;  	N??-8):J:J:L:LN N N ..sG<<==y?O?O?Q?QS S 	Sr4   N)r;   r<   r=   r@   r>   rA   r:   rC   r4   r2   rO   rO      s        _JG C1!N|#%1	
 	
 #F+ " t!SX1#%	
 	
   r ; FDS S S S Sr4   rO   )r,   ampr   commonr   r   rE   rO   rC   r4   r2   <module>r_      s    				       ! ! ! ! ! !Z Z Z Z Z Z Z Zz _  _  _  _  _]  _  _  _F2S 2S 2S 2S 2S} 2S 2S 2S 2S 2Sr4   