
    V|h                     6    S SK Jr  SSKJrJr   " S S\5      rg)   )InfoExtractor   )dict_getint_or_nonec            
       J    \ rS 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)KinoPoiskIE   RUz1https?://(?:www\.)?kinopoisk\.ru/film/(?P<id>\d+)z*https://www.kinopoisk.ru/film/81041/watch/ 4f71c80baea10dfa54a837a46111d32681041mp4u4   Алеша попович и тугарин змейz$md5:43787e673d68b805d0aa1df5a5aea701zre:^https?://.*i     )idexttitledescription	thumbnailduration	age_limit)urlmd5	info_dictz#https://www.kinopoisk.ru/film/81041T)r   only_matchingc                    U R                  U5      nU R                  SUSU0S9nU R                  U R                  SUS5      U5      S   nUS   nUR	                  S5      =(       d    US	   nU R                  US
   S   USSSS9n[        US5      nUR	                  S5      =(       d    UR	                  S5      n	[        UR	                  S5      5      n
[        UR	                  S5      5      nUUUU	U
UUS.$ )Nz&https://ott-widget.kinopoisk.ru/v1/kp/kpId)queryz8(?s)<script[^>]+\btype=["\']application/json[^>]+>(.+?)<datamodels
filmStatusr   originalTitleplaylistEntityurir   m3u8_nativehls)entry_protocolm3u8_id)descriptscriptionr   shortDescriptscriptionshortDescriptioncoverUrl	posterUrlr   restrictionAge)r   r   r   r   r   r   formats)	_match_id_download_webpage_parse_json_search_regexget_extract_m3u8_formatsr   r   )selfr   video_idwebpager   filmr   r-   r   r   r   r   s               T/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/kinopoisk.py_real_extractKinoPoiskIE._real_extract   s5   >>#&((4h8$ ) & K! 	 	  L!!:T/%:,,!"5)8U(% - 9  AB HHZ(ADHH[,A	txx
34)9 :;	 &" "
 	
     N)	__name__
__module____qualname____firstlineno___GEO_COUNTRIES
_VALID_URL_TESTSr9   __static_attributes__r<   r;   r8   r   r      sL    VNEJ;1KA+
 5F"#
r;   r   N)commonr   utilsr   r   r   r<   r;   r8   <module>rG      s    !7
- 7
r;   