]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/matchtv.py
3 from .common
import InfoExtractor
4 from ..utils
import xpath_text
7 class MatchTVIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://matchtv\.ru(?:/on-air|/?#live-player)'
10 'url': 'http://matchtv.ru/#live-player',
14 'title': r
're:^Матч ТВ - Прямой эфир \d{4}-\d{2}-\d{2} \d{2}:\d{2}$',
18 'skip_download': True,
21 'url': 'http://matchtv.ru/on-air/',
22 'only_matching': True,
25 def _real_extract(self
, url
):
26 video_id
= 'matchtv-live'
27 video_url
= self
._download
_json
(
28 'http://player.matchtv.ntvplus.tv/player/smil', video_id
,
32 'contentId': '561d2c0df7159b37178b4567',
34 'includeHighlights': '0',
36 'sessionId': random
.randint(1, 1000000000),
37 'contentType': 'channel',
42 'Referer': 'http://player.matchtv.ntvplus.tv/embed-player/NTVEmbedPlayer.swf',
43 })['data']['videoUrl']
44 f4m_url
= xpath_text(self
._download
_xml
(video_url
, video_id
), './to')
45 formats
= self
._extract
_f
4m
_formats
(f4m_url
, video_id
)
46 self
._sort
_formats
(formats
)
49 'title': 'Матч ТВ - Прямой эфир',