
    VGh'                     F    d dl mZ ddlmZmZmZ ddlmZ  G d de      Zy)   )InfoExtractor   )parse_age_limitparse_durationurl_or_none)traverse_objc            
       |    e Zd ZdZdddddddg d	d
ddiddddddddddgd
ddiddddg ddddddidgZd Zy)MagellanTVIEzAhttps?://(?:www\.)?magellantv\.com/(?:watch|video)/(?P<id>[\w-]+)z;https://www.magellantv.com/watch/incas-the-new-story?type=vzincas-the-new-storymp4zIncas: The New Storyz$md5:936c7f6d711c02dfb9db22a067b586fe   g     @)zAncient HistoryArchaeologyAnthropology)idexttitledescription	age_limitdurationtagsskip_downloadm3u8)url	info_dictparamszFhttps://www.magellantv.com/video/tortured-to-death-murdering-the-nannyz%tortured-to-death-murdering-the-nannyz&Tortured to Death: Murdering the Nannyz$md5:d87033594fa218af2b1a8b49f52511e5g     @z
True CrimeMurderz:https://www.magellantv.com/watch/celebration-nation?type=szcelebration-nation)zArt & CulturezHuman Interestr   ChinaHistory	Ancestors)r   r   r   r   r   c                    | j                  |      }| j                  ||      }| j                  ||      d   d   d   }t        |dt        ht
        f      }g i }}t        t        |dt        hf            D ]?  }| j                  ||ddd	      \  }	}
|j                  |	       | j                  |
|
       A |sNt        |ddt        hf      x}r8d|v r| j                  |       | j                  | j                   d| d       |||dt        |dt        hfddt        hfdt        hfdt         hfddt        hfd      S )Nprops	pagePropsreactContext))videodetail)seriescurrentEpisode))	manifests.hlsjwp_video_urlr   r(   F)m3u8_idfatal)targeterrorDetailPageerrorMessagezavailable in your country)msgz said: T)expected)r   formats	subtitlesr   metadatar   r   ratingCategoryr   .)r   r   r   r   r   )	_match_id_download_webpage_search_nextjs_datar   dictanysetr   #_extract_m3u8_formats_and_subtitlesextend_merge_subtitlesstrraise_geo_restrictedraise_no_formatsIE_NAMEr   r   )selfr   video_idwebpagecontextdatar1   r2   m3u8_urlfmtssubserrors               d/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/magellantv.py_real_extractzMagellanTVIE._real_extract,   s   >>#&((h7**7H=gF{STbcG&Y\`[acf%ghL0\_j^k/lmn 	:HAA(E5 B GJD$NN4 !!$y!9		:
 \'<M~`c_d;e%ffEf*e3))e)4!!T\\N'%"AD!Q "
 4!C5) *MC5A'.)9:.0ABse," 	
 	
    N)__name__
__module____qualname__
_VALID_URL_TESTSrL    rM   rK   r
   r
      s    UJL'+AF
 #F+ X9=A!8,
 #F+ L&[ 
 #F+
1"FH
rM   r
   N)	commonr   utilsr   r   r   utils.traversalr   r
   rS   rM   rK   <module>rW      s    ! @ @ *B
= B
rM   