1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-18 00:05:46 +00:00

[extractor/rtve.es:live] Fix title and video id discovering

This commit is contained in:
Álvaro Mondéjar Rubio 2021-08-18 14:42:47 +02:00
parent a803582717
commit 95670350cb

View file

@ -17,7 +17,6 @@ from ..utils import (
float_or_none, float_or_none,
qualities, qualities,
remove_end, remove_end,
remove_start,
std_headers, std_headers,
) )
@ -208,7 +207,7 @@ class RTVELiveIE(RTVEALaCartaIE):
'info_dict': { 'info_dict': {
'id': 'la-1', 'id': 'la-1',
'ext': 'mp4', 'ext': 'mp4',
'title': 're:^La 1 [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$', 'title': r're:^[^\s].+[^\s]$',
}, },
'params': { 'params': {
'skip_download': 'live stream', 'skip_download': 'live stream',
@ -220,14 +219,12 @@ class RTVELiveIE(RTVEALaCartaIE):
video_id = mobj.group('id') video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)
title = remove_end(self._og_search_title(webpage), ' en directo en RTVE.es') title = remove_end(
title = remove_start(title, 'Estoy viendo ') self._html_search_regex(r'<title[^>]*>(.*?)</title>', webpage, 'title'),
' en directo, en RTVE Play')
vidplayer_id = self._search_regex( vidplayer_id = self._search_regex(
(r'playerId=player([0-9]+)', r'"idAsset":\s*"([0-9]+)"', webpage, 'internal video ID')
r'class=["\'].*?\blive_mod\b.*?["\'][^>]+data-assetid=["\'](\d+)',
r'data-id=["\'](\d+)'),
webpage, 'internal video ID')
return { return {
'id': video_id, 'id': video_id,