U
    g                     @   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=featuredvideoZ 730855d559abbad6b42c2be1fa584917z$0000014b-70a1-dd8c-af7f-f7b559330001mp4zMating Crabs Busted by Sharksz$md5:16f25aeffdeba55aaa8ec37e093ad8b3i?TZ20150209ZNAGS)idexttitledescription	timestampupload_dateZuploaderThePlatformzRedirects to main page)urlmd5	info_dictZadd_ieskipzIhttp://video.nationalgeographic.com/wild/when-sharks-attack/the-real-jawsZ 6a3105eb448c070503b3105fb9b320b5z$ngc-I0IauNSWznb_UV008GxSbwY35BZvgi2ezThe Real Jawsz$md5:8d3e09d9d53a85cd397b4b21b2c77be6iXuUZ20150608c                 C   sB   t |}| ||}| d|d}ddtd| dddi|d	S )
Nz=id="(?:videoPlayer|player-container)"[^>]+data-guid="([^"]+)"guidZurl_transparentr   z8http://link.theplatform.com/s/ngs/media/guid/2423130747/z	?mbr=trueZforce_smil_urlT)_typeZie_keyr   r	   )r   Z_download_webpageZ_search_regexr   )selfr   nameZwebpager    r   G/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/nationalgeographic.py_real_extract.   s     
z'NationalGeographicVideoIE._real_extractN)__name__
__module____qualname__Z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/Z 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:)[Z20181119   )r	   r
   r   r   r   r   Z	age_limitZskip_downloadTzContent not available)r   r   paramsr   z&https://www.nationalgeographic.com/tv/Z 238bb0a0c2aba67922c48709ce0c06fdN)r   r   r   r   r   Z_HOME_PAGE_URLZ_API_KEYr   r   r   r   r    @   s"   
 r    N)	commonr   Zfoxr   utilsr   r   r   r    r   r   r   r   <module>   s   7