]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/nintendo.py
3 from .common
import InfoExtractor
4 from .ooyala
import OoyalaIE
7 class NintendoIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?nintendo\.com/(?:games/detail|nintendo-direct)/(?P<id>[^/?#&]+)'
10 'url': 'https://www.nintendo.com/games/detail/duck-hunt-wii-u/',
12 'id': 'MzMmticjp0VPzO3CCj4rmFOuohEuEWoW',
14 'title': 'Duck Hunt Wii U VC NES - Trailer',
18 'skip_download': True,
22 'url': 'http://www.nintendo.com/games/detail/tokyo-mirage-sessions-fe-wii-u',
24 'id': 'tokyo-mirage-sessions-fe-wii-u',
25 'title': 'Tokyo Mirage Sessions ♯FE',
29 'url': 'https://www.nintendo.com/nintendo-direct/09-04-2019/',
31 'id': 'J2bXdmaTE6fe3dWJTPcc7m23FNbc_A1V',
33 'title': 'Switch_ROS_ND0904-H264.mov',
37 'skip_download': True,
42 def _real_extract(self
, url
):
43 page_id
= self
._match
_id
(url
)
45 webpage
= self
._download
_webpage
(url
, page_id
)
48 OoyalaIE
._build
_url
_result
(m
.group('code'))
50 r
'data-(?:video-id|directVideoId)=(["\'])(?P
<code
>(?
:(?
!\
1).)+)\
1', webpage)]
52 title = self._html_search_regex(
53 r'(?s
)<(?
:span|div
)[^
>]+class="(?:title|wrapper)"[^
>]*>.*?
<h1
>(.+?
)</h1
>',
54 webpage, 'title
', fatal=False)
56 return self.playlist_result(
57 entries, page_id, title)