o
    i                     @   sL   d dl mZ d dlmZ ddlmZmZ G dd deZG dd deZd	S )
   )InfoExtractor)FOXIE   )smuggle_urlurl_basenamec                   @   s`   e Zd ZdZdZddddddd	d
dddgdddddddddddddgddgZdd ZdS )NationalGeographicVideoIEznatgeo:videoz+https?://video\.nationalgeographic\.com/.*?z_http://video.nationalgeographic.com/video/news/150210-news-crab-mating-vin?source=featuredvideo 730855d559abbad6b42c2be1fa584917z$0000014b-70a1-dd8c-af7f-f7b559330001mp4zMating Crabs Busted by Sharksz$md5:16f25aeffdeba55aaa8ec37e093ad8b3i?T20150209NAGS)idexttitledescription	timestampupload_dateuploaderThePlatformzRedirects to main page)urlmd5	info_dictadd_ieskipzIhttp://video.nationalgeographic.com/wild/when-sharks-attack/the-real-jaws 6a3105eb448c070503b3105fb9b320b5z$ngc-I0IauNSWznb_UV008GxSbwY35BZvgi2ezThe Real Jawsz$md5:8d3e09d9d53a85cd397b4b21b2c77be6iXuU20150608c                 C   sB   t |}| ||}| d|d}ddtd| dddi|d	S )
Nz=id="(?:videoPlayer|player-container)"[^>]+data-guid="([^"]+)"guidurl_transparentr   z8http://link.theplatform.com/s/ngs/media/guid/2423130747/z	?mbr=trueforce_smil_urlT)_typeie_keyr   r   )r   _download_webpage_search_regexr   )selfr   namewebpager    r%   W/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/nationalgeographic.py_real_extract.   s   
z'NationalGeographicVideoIE._real_extractN)__name__
__module____qualname__IE_NAME
_VALID_URL_TESTSr'   r%   r%   r%   r&   r   	   s>    		!r   c                	   @   s<   e Zd ZdZdddddddd	d
ddiddgZdZdZdS )NationalGeographicTVIEzGhttps?://(?:www\.)?nationalgeographic\.com/tv/watch/(?P<id>[\da-fA-F]+)zMhttps://www.nationalgeographic.com/tv/watch/6a875e6e734b479beda26438c9f21138/ 6a875e6e734b479beda26438c9f21138r	   zWhy Nat Geo? Valley of the BoomzqThe lives of prominent figures in the tech world, including their friendships, rivalries, victories and failures.i:)[20181119   )r   r   r   r   r   r   	age_limitskip_downloadTzContent not available)r   r   paramsr   z&https://www.nationalgeographic.com/tv/ 238bb0a0c2aba67922c48709ce0c06fdN)r(   r)   r*   r,   r-   _HOME_PAGE_URL_API_KEYr%   r%   r%   r&   r.   @   s"    
r.   N)	commonr   foxr   utilsr   r   r   r.   r%   r%   r%   r&   <module>   s
    7