2 from __future__
import unicode_literals
4 from .brightcove
import BrightcoveNewIE
5 from ..utils
import extract_attributes
8 class BandaiChannelIE(BrightcoveNewIE
):
9 IE_NAME
= 'bandaichannel'
10 _VALID_URL
= r
'https?://(?:www\.)?b-ch\.com/titles/(?P<id>\d+/\d+)'
12 'url': 'https://www.b-ch.com/titles/514/001',
13 'md5': 'a0f2d787baa5729bed71108257f613a4',
15 'id': '6128044564001',
17 'title': 'メタルファイターMIKU 第1話',
18 'timestamp': 1580354056,
19 'uploader_id': '5797077852001',
20 'upload_date': '20200130',
24 'skip_download': True,
28 def _real_extract(self
, url
):
29 video_id
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, video_id
)
31 attrs
= extract_attributes(self
._search
_regex
(
32 r
'(<video-js[^>]+\bid="bcplayer"[^>]*>)', webpage
, 'player'))
33 bc
= self
._download
_json
(
34 'https://pbifcd.b-ch.com/v1/playbackinfo/ST/70/' + attrs
['data-info'],
35 video_id
, headers
={'X-API-KEY': attrs['data-auth'].strip()}
)['bc']
36 return self
._parse
_brightcove
_metadata
(bc
, bc
['id'])