]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/nintendo.py
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
7 from .ooyala
import OoyalaIE
10 class NintendoIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?nintendo\.com/(?:games/detail|nintendo-direct)/(?P<id>[^/?#&]+)'
13 'url': 'https://www.nintendo.com/games/detail/duck-hunt-wii-u/',
15 'id': 'MzMmticjp0VPzO3CCj4rmFOuohEuEWoW',
17 'title': 'Duck Hunt Wii U VC NES - Trailer',
21 'skip_download': True,
25 'url': 'http://www.nintendo.com/games/detail/tokyo-mirage-sessions-fe-wii-u',
27 'id': 'tokyo-mirage-sessions-fe-wii-u',
28 'title': 'Tokyo Mirage Sessions ♯FE',
32 'url': 'https://www.nintendo.com/nintendo-direct/09-04-2019/',
34 'id': 'J2bXdmaTE6fe3dWJTPcc7m23FNbc_A1V',
36 'title': 'Switch_ROS_ND0904-H264.mov',
40 'skip_download': True,
45 def _real_extract(self
, url
):
46 page_id
= self
._match
_id
(url
)
48 webpage
= self
._download
_webpage
(url
, page_id
)
51 OoyalaIE
._build
_url
_result
(m
.group('code'))
53 r
'data-(?:video-id|directVideoId)=(["\'])(?P
<code
>(?
:(?
!\
1).)+)\
1', webpage)]
55 title = self._html_search_regex(
56 r'(?s
)<(?
:span|div
)[^
>]+class="(?:title|wrapper)"[^
>]*>.*?
<h1
>(.+?
)</h1
>',
57 webpage, 'title
', fatal=False)
59 return self.playlist_result(
60 entries, page_id, title)