U
    y^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.movgt)@c                 C   sL   |  |}| ||}dd td|D }| jd|ddd}| |||S )Nc                 S   s   g | ]}t |d qS )code)r   _build_url_resultgroup).0m r   PC:\Users\TaGoRe\Desktop\beinconnect-dl\binaries\youtube_dl\extractor\nintendo.py
<listcomp>2   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   