
    VGh                     .    d dl ZddlmZ  G d de      Zy)    N   )InfoExtractorc                   \    e Zd ZdZ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gZd Zy)
GameSpotIEz[https?://(?:www\.)?gamespot\.com/(?:video|article|review)s/(?:[^/]+/\d+-|embed/)(?P<id>\d+)zLhttp://www.gamespot.com/videos/arma-3-community-guide-sitrep-i/2300-6410818/ b2a30deaa8654fcccd43713a6b6a4825zgs-2300-6410818mp4z"Arma 3 - Community Guide: SITREP IzECheck out this video where some of the basics of Arma 3 is explained.)idexttitledescriptionz+manifest URL give HTTP Error 404: Not Found)urlmd5	info_dictskipzYhttp://www.gamespot.com/videos/the-witcher-3-wild-hunt-xbox-one-now-playing/2300-6424837/ 173ea87ad762cf5d3bf6163dceb255a6zgs-2300-6424837z&Now Playing - The Witcher 3: Wild HuntzRJoin us as we take a look at the early hours of The Witcher 3: Wild Hunt and more.)r   r   r   z.https://www.gamespot.com/videos/embed/6439218/T)r   only_matchingzYhttps://www.gamespot.com/articles/the-last-of-us-2-receives-new-ps4-trailer/1100-6454469/zBhttps://www.gamespot.com/reviews/gears-of-war-review/1900-6161188/c           	      
   | j                  |      }| j                  ||      }| j                  | j                  d|dd      |      }t        j
                  j                  |d         }|d   }g }|j                  d      }|r| j                  ||dd	d
d      }	|	D ]r  }
|j                  |
       |
j                         }|d= |j                  |
d   j                  dd      d|
d   j                  dd      d       |j                  |       t |j                  d      }|r$|j                  | j                  ||dd             |j                  d      xs ||||| j                  d|      | j!                  |      dS )Nzdata-video=(["\'])({.*?})\1z
video data   )groupr   videoStreamsadaptive_streamr   m3u8_nativehlsF)m3u8_idfatalmanifest_url	format_idzhls-zhttp-httpr   z.m3u8z.mp4)r   protocolr   adaptive_dashdash)mpd_idr   guidr   )r	   
display_idr   formatsr   	thumbnail)	_match_id_download_webpage_parse_json_html_search_regexurllibparseunquoteget_extract_m3u8_formatsappendcopyupdatereplaceextend_extract_mpd_formats_html_search_meta_og_search_thumbnail)selfr   page_idwebpage
data_videor   streamsr%   m3u8_urlm3u8_formatsfhttp_fmpd_urls                b/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/gamespot.py_real_extractzGameSpotIE._real_extract&   s   ..%((g6%%d&=&=*G '> '#$+-
 $$Z%89^,;;0155'5-U 6 ,L " 	'q!>*!";!7!7!H &U8++GV< 
 v&	' ++o.NN444u 5 > ? ..(3G!11-I227;
 	
    N)__name__
__module____qualname__
_VALID_URL_TESTSrC    rD   rB   r   r      s}    oJ]1#9b	
 >
 k1#=o	
	 @ k T3F<&
rD   r   )urllib.parser+   commonr   r   rJ   rD   rB   <module>rM      s     !F
 F
rD   