
    V|h                     F    S SK r SSKJr  SSKJrJrJrJr   " S S\5      rg)    N   )InfoExtractor   )determine_extint_or_none	qualitiesunescapeHTMLc            
       D    \ rS rSrSrSSSSSSS	S
SS.S.SSS./rS rSrg)GiantBombIE   zXhttps?://(?:www\.)?giantbomb\.com/(?:videos|shows)/(?P<display_id>[^/]+)/(?P<id>\d+-\d+)zLhttp://www.giantbomb.com/videos/quick-look-destiny-the-dark-below/2300-9782/ 132f5a803e7e0ab0e274d84bda1e77aez	2300-9782z!quick-look-destiny-the-dark-belowmp4z#Quick Look: Destiny: The Dark Belowz$md5:0aa3aaf2772a41b91d44c63f30dfad24i_	  zre:^https?://.*\.jpg$)id
display_idexttitledescriptionduration	thumbnail)urlmd5	info_dictz8https://www.giantbomb.com/shows/ben-stranding/2970-20212T)r   only_matchingc                    U R                  U5      nUR                  S5      nUR                  S5      nU R                  X5      nU R                  U5      nU R	                  U5      nU R                  U5      n[        R                  " [        U R                  SUS5      5      5      n	[        U	R                  S5      5      n
[        / SQ5      n/ nU	S   R                  5        H  u  pUS:X  a  M  [        U5      nUS	:X  a?  U R                  US
-   U5      nU(       a!  U" U5      US   S'   UR!                  U5        M[  M]  US:X  a$  UR!                  U R#                  XSSSSS95        M  UR%                  UUU" U5      S.5        M     U(       d*  U	R                  S5      nU(       a  U R'                  US5      $ UUUUUU
US.$ )Nr   r   zdata-video="([^"]+)"z
data-videolengthSeconds)f4m_lowprogressive_lowf4m_highprogressive_highf4m_hdprogressive_hdvideoStreams
f4m_streamf4mz?hdcore=3.3.1r   qualitym3u8r   m3u8_nativehlsF)r   entry_protocolm3u8_idfatal)r   	format_idr%   	youtubeIDYoutube)r   r   r   r   r   r   formats)_match_valid_urlgroup_download_webpage_og_search_title_og_search_description_og_search_thumbnailjsonloadsr	   _search_regexr   getr   itemsr   _extract_f4m_formatsextend_extract_m3u8_formatsappend
url_result)selfr   mobjvideo_idr   webpager   r   r   videor   r%   r/   r,   	video_urlr   f4m_formats
youtube_ids                     T/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/giantbomb.py_real_extractGiantBombIE._real_extract   s   $$S)::d#ZZ-
((9%%g.11':--g6	

<(:(:#Wl)< = > uyy9: < = $).$9$?$?$A IL(	*Ce|"77	O8SU_`07	0BKN9-NN;/  t99u]!  :  0 1 $!*&y1   %B( ;/Jz9== $&" 
 	
     N)__name__
__module____qualname____firstlineno__
_VALID_URL_TESTSrI   __static_attributes__rL   rK   rH   r   r      sF    lJ]1=:A1
 JF"6
rK   r   )	r6   commonr   utilsr   r   r   r	   r   rL   rK   rH   <module>rV      s#     ! I
- I
rK   