3
×b`Z  ã               @   s@   d dl mZ d dlZddlmZ ddlmZ G dd„ deƒZdS )é    )Úunicode_literalsNé   )ÚInfoExtractor)ÚOoyalaIEc               @   sd   e Zd ZdZddddddœdd	id
gdœddddœddœddddddœdd	id
gdœgZdd„ ZdS )Ú
NintendoIEzRhttps?://(?:www\.)?nintendo\.com/(?:games/detail|nintendo-direct)/(?P<id>[^/?#&]+)z6https://www.nintendo.com/games/detail/duck-hunt-wii-u/Z MzMmticjp0VPzO3CCj4rmFOuohEuEWoWÚflvz Duck Hunt Wii U VC NES - Trailerg}?5^º)N@)ÚidÚextÚtitleÚdurationÚskip_downloadTÚOoyala)ÚurlÚ	info_dictÚparamsÚadd_iezChttp://www.nintendo.com/games/detail/tokyo-mirage-sessions-fe-wii-uztokyo-mirage-sessions-fe-wii-uu   Tokyo Mirage Sessions â™¯FE)r   r
   é   )r   r   Úplaylist_countz4https://www.nintendo.com/nintendo-direct/09-04-2019/Z J2bXdmaTE6fe3dWJTPcc7m23FNbc_A1VÚmp4zSwitch_ROS_ND0904-H264.movg¼t“„)¢@c             C   sL   | j |ƒ}| j||ƒ}dd„ tjd|ƒD ƒ}| jd|ddd�}| j|||ƒS )Nc             S   s   g | ]}t j|jd ƒƒ‘qS )Úcode)r   Ú_build_url_resultÚgroup)Ú.0Úm© r   úNC:\Users\Broad\Desktop\BeinConnetFix\binaries\youtube_dl\extractor\nintendo.pyú
<listcomp>3   s   z,NintendoIE._real_extract.<locals>.<listcomp>z?data-(?:video-id|directVideoId)=(["\'])(?P<code>(?:(?!\1).)+)\1zF(?s)<(?:span|div)[^>]+class="(?:title|wrapper)"[^>]*>.*?<h1>(.+?)</h1>r
   F)Úfatal)Ú	_match_idÚ_download_webpageÚreÚfinditerÚ_html_search_regexÚplaylist_result)Úselfr   Úpage_idÚwebpageÚentriesr
   r   r   r   Ú_real_extract-   s    
zNintendoIE._real_extractN)Ú__name__Ú
__module__Ú__qualname__Ú
_VALID_URLÚ_TESTSr(   r   r   r   r   r   
   s(   r   )Ú
__future__r   r    Úcommonr   Úooyalar   r   r   r   r   r   Ú<module>   s   