1 from .common
import InfoExtractor
2 from ..utils
import extract_attributes
, remove_end
5 class TheHoleTvIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:www\.)?the-hole\.tv/episodes/(?P<id>[\w-]+)'
8 'url': 'https://the-hole.tv/episodes/gromkii-vopros-sergey-orlov',
9 'md5': 'fea6682f47786f3ae5a6cbd635ec4bf9',
11 'id': 'gromkii-vopros-sergey-orlov',
13 'title': 'Сергей Орлов — Громкий вопрос',
14 'thumbnail': 'https://assets-cdn.the-hole.tv/images/t8gan4n6zn627e7wni11b2uemqts',
15 'description': 'md5:45741a9202331f995d9fb76996759379',
19 def _real_extract(self
, url
):
20 video_id
= self
._match
_id
(url
)
21 webpage
= self
._download
_webpage
(url
, video_id
)
23 player_attrs
= extract_attributes(self
._search
_regex
(
24 r
'(<div[^>]*\bdata-controller="player"[^>]*>)', webpage
, 'video player'))
25 formats
, subtitles
= self
._extract
_m
3u8_formats
_and
_subtitles
(
26 player_attrs
['data-player-source-value'], video_id
, 'mp4')
30 'title': remove_end(self
._html
_extract
_title
(webpage
), ' — The Hole'),
31 'description': self
._og
_search
_description
(webpage
),
32 'thumbnail': player_attrs
.get('data-player-poster-value'),
34 'subtitles': subtitles
,