1 from .common
import InfoExtractor
9 class NTVCoJpCUIE(InfoExtractor
):
10 IE_NAME
= 'cu.ntv.co.jp'
11 IE_DESC
= 'Nippon Television Network'
12 _VALID_URL
= r
'https?://cu\.ntv\.co\.jp/(?!program)(?P<id>[^/?&#]+)'
14 'url': 'https://cu.ntv.co.jp/televiva-chill-gohan_181031/',
16 'id': '5978891207001',
18 'title': '桜エビと炒り卵がポイント! 「中華風 エビチリおにぎり」──『美虎』五十嵐美幸',
19 'upload_date': '20181213',
20 'description': 'md5:1985b51a9abc285df0104d982a325f2a',
21 'uploader_id': '3855502814001',
22 'timestamp': 1544669941,
26 'skip_download': True,
30 BRIGHTCOVE_URL_TEMPLATE
= 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s'
32 def _real_extract(self
, url
):
33 display_id
= self
._match
_id
(url
)
34 webpage
= self
._download
_webpage
(url
, display_id
)
35 player_config
= self
._search
_nuxt
_data
(webpage
, display_id
)
36 video_id
= traverse_obj(player_config
, ('movie', 'video_id'))
38 raise ExtractorError('Failed to extract video ID for Brightcove')
39 account_id
= traverse_obj(player_config
, ('player', 'account')) or '3855502814001'
40 title
= traverse_obj(player_config
, ('movie', 'name'))
42 og_title
= self
._og
_search
_title
(webpage
, fatal
=False) or traverse_obj(player_config
, ('player', 'title'))
44 title
= og_title
.split('(', 1)[0].strip()
45 description
= (traverse_obj(player_config
, ('movie', 'description'))
46 or self
._html
_search
_meta
(['description', 'og:description'], webpage
))
48 '_type': 'url_transparent',
50 'display_id': display_id
,
52 'description': description
,
53 'url': smuggle_url(self
.BRIGHTCOVE_URL_TEMPLATE
% (account_id
, video_id
), {'geo_countries': ['JP']}),
54 'ie_key': 'BrightcoveNew',