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