
    V|h                     N    S SK Jr  SSKJrJrJrJrJrJrJ	r	J
r
   " S S\5      rg)   )InfoExtractor   )ExtractorErrordetermine_extint_or_nonemimetype2extparse_iso8601strip_jsonpunified_timestampurl_or_nonec                       \ rS rSrS rSrg)AMPIE   c                   ^ U R                  US SS[        S9nUR                  S0 5      R                  S5      mT(       d(  [        SR	                  U R
                  US   5      5      eTS   nS/U4S	 jjn/ nU" S
5      nU(       a  [        U[        5      (       a  U/nU H  nUR                  S0 5      n[        UR                  S5      5      n	U	(       d  M8  UR                  U R                  U	S5      [        UR                  S5      5      [        UR                  S5      5      S.5        M     0 n
U" S5      nU(       a  [        U[        5      (       a  U/nU H  nUR                  S0 5      n[        UR                  S5      5      nU(       d  M8  U
R                  UR                  S5      =(       d    S/ 5      R                  U[        UR                  S5      5      =(       d    [        U5      S.5        M     / nU" S5      n[        U[        5      (       a  U/nU GHF  nUR                  S0 5      n[        UR                  S5      5      nU(       d  M9  [        UR                  S5      5      =(       d    [        U5      nUS:X  a&  UR                  U R!                  US-   USSS95        M  US:X  a9  U R#                  UUSSSS 9u  nnUR                  U5        U R%                  UU
S!9  M  UR                  UR                  S"0 5      R                  S0 5      R                  S#5      U[        UR                  S$5      5      [        UR                  S%5      5      US&.5        GMI     ['        TR                  S'5      S(5      =(       d    [)        TR                  S)5      5      nUU" S*5      U" S+5      UU[        US,   R                  S0 5      R                  S-5      5      U
US..$ )0NzDownloading Akamai AMP feedz"Unable to download Akamai AMP feed)transform_sourcechannelitemz{} said: {}errorguidc                    > SU  3nTR                  S5      =(       d    TnUR                  U5      =(       d)    TR                  U5      =(       d    TR                  X5      $ )Nzmedia-zmedia-group)get)namedefault
media_namemedia_groupr   s       N/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/amp.pyget_media_node0AMPIE._extract_feed_info.<locals>.get_media_node   sM    !$J((=19TK??:.a$((:2Fa$((SWJaa    	thumbnailz@attributesurlzhttp:widthheight)r!   r"   r#   subTitlehreflangentype)r!   extcontentf4mz'?hdcore=3.4.0&plugin=aasp-3.4.0.132.124hdsF)f4m_idfatalm3u8mp4hls)m3u8_idr.   )targetzmedia-categorylabelbitratefileSize)	format_idr!   tbrfilesizer)   pubDate zdc-datetitledescription    duration)idr<   r=   
thumbnails	timestampr?   	subtitlesformats)N)_download_jsonr
   r   r   formatIE_NAME
isinstancedictr   append_proto_relative_urlr   
setdefaultr   r   extend_extract_f4m_formats#_extract_m3u8_formats_and_subtitles_merge_subtitlesr   r	   )selfr!   feedvideo_idr   rA   media_thumbnailthumbnail_datar    thumbnail_urlrC   media_subtitlesubtitle_datasubtitlesubtitle_hrefrD   media_content
media_datamedia	media_urlr)   fmtssubsrB   r   s                           @r   _extract_feed_infoAMPIE._extract_feed_info   s   ""40; # P xx	2&**62 !5!5dllDM!RSS<	b
 
(5/400#2"3"1*..}bA	 +IMM%,@ A$!!33M7K(w)?@))--*AB#  #2 	'
3.$//"0!1!/(,,]B? +HLL,@ A$$$X\\&%9%AT2FMM('V(<=]}A]O  "0 &y1mT***OM'JNN="5E#EIIe$45Iuyy01M]95MCe|t88 IIU%  9  9 : !EExU F L
dt$%%d9%=!+0@"!E!I!I-Y[!\!`!`ah!i$&uyy';< +EIIj,A B  ! (0 &dhhy&93?e=QUQYQYZcQdCe	 #G,)-8$"#M!$4$8$8$K$O$OPZ$[\"	
 		
r    N)__name__
__module____qualname____firstlineno__ra   __static_attributes__rc   r   r   r   r      s    U
r   r   N)commonr   utilsr   r   r   r   r	   r
   r   r   r   rc   r   r   <module>rk      s%    !	 	 	W
M W
r   