
    V|h                     f    S SK r SSKJr  SSKJr   " S S\5      r " S S\5      r " S	 S
\5      rg)    N   )AMPIE)InfoExtractorc                       \ rS rSrSrSrSrSSSSS	S
SSSS.SS0S.SSSSSSSS	SS.SS0S.SSSSSSSS S!S	S".S#S$.S%S&S'SS(S)S*S+S,S	S".S-S$.S.S/S0.S1S/S0./r\S2 5       r	S3 r
S4rg5)6	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              #   t   #    [         R                  " SU5       H  nSUR                  S5       3v   M     g 7f)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       R/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/foxnews.py_extract_embed_urlsFoxNewsIE._extract_embed_urlsQ   s=     KK D K4::V`KaJbccs   68c                 ^    U R                  U5      nU R                  SU SU 35      nX#S'   U$ )Nz(https://api.foxnews.com/v3/video-player/z?callback=uid_r   )	_match_id_extract_feed_info)selfr   r,   infos       r3   _real_extractFoxNewsIE._real_extract[   s=    >>#&&&6xjxjY[T
     N)__name__
__module____qualname____firstlineno__IE_NAMEIE_DESC
_VALID_URL_TESTSclassmethodr4   r;   __static_attributes__r>   r=   r3   r   r      s   G/GzJ ?%[5)E)	 '/	
  [%*0))5	 '/	
  V5)D')5	 	
  G5%VG')5	 9	
  f!	

 B!	
ADFL d dr=   r   c                   ^    \ rS rSrSrSSSSSSS	S
SS.SS0S.SSSSSSSSSS.SS./rS rSrg)FoxNewsVideoIEd   z1https?://(?: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                 X    U R                  U5      nU R                  SU 3[        U5      $ )Nzhttps://video.foxnews.com/v/)r7   
url_resultr   )r9   r   r,   s      r3   r;   FoxNewsVideoIE._real_extract   s,    >>#&!=hZH)U]^^r=   r>   N)r?   r@   rA   rB   rE   rF   r;   rH   r>   r=   r3   rJ   rJ   d   so    EJ<!60%%A	
 #F+ =!C%?8#	
 F8_r=   rJ   c                   l    \ rS rSrSrSrSSSSSS	S
SSSS.SS0S.SSSSSSSSSS.SS.SSS./rS  rS!rg")#FoxNewsArticleIE   zKhttps?://(?: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#   rQ   z`http://insider.foxnews.com/2016/08/25/univ-wisconsin-student-group-pushing-silence-certain-wordsTr)   c                 H   U R                  U5      nU R                  X5      nU R                  SUSSS S9nU(       a'  U R                  SU-   [        R                  5       5      $ U R                  [        [        R                  X5      5      [        R                  5       5      $ )Nz&data-video-id=([\'"])(?P<id>[^\'"]+)\1zvideo IDr   )r/   defaultzhttp://video.foxnews.com/v/)r7   _download_webpage_html_search_regexrS   r   ie_keynextr4   )r9   r   
display_idr1   r,   s        r3   r;   FoxNewsArticleIE._real_extract   s    ^^C(
((9**5ZtT + ; ??-8):J:J:LN N ..s<=y?O?O?QS 	Sr=   r>   N)	r?   r@   rA   rB   rE   rC   rF   r;   rH   r>   r=   r3   rV   rV      s    _JG C1!N|#%1	
 #F+" t!SX1#%	
  r; FDSr=   rV   )r-   ampr   commonr   r   rJ   rV   r>   r=   r3   <module>rh      s:    	  !Z Zz _]  _F2S} 2Sr=   