mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[vlive] Use live titles for live streams
This commit is contained in:
parent
89c63cc5f8
commit
069f918302
1 changed files with 16 additions and 9 deletions
|
@ -120,10 +120,14 @@ def _live(self, video_id, webpage):
|
||||||
fatal=False, live=True))
|
fatal=False, live=True))
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return dict(self._get_common_fields(webpage),
|
info = self._get_common_fields(webpage)
|
||||||
id=video_id,
|
info.update({
|
||||||
formats=formats,
|
'title': self._live_title(info['title']),
|
||||||
is_live=True)
|
'id': video_id,
|
||||||
|
'formats': formats,
|
||||||
|
'is_live': True,
|
||||||
|
})
|
||||||
|
return info
|
||||||
|
|
||||||
def _replay(self, video_id, webpage, long_video_id, key):
|
def _replay(self, video_id, webpage, long_video_id, key):
|
||||||
playinfo = self._download_json(
|
playinfo = self._download_json(
|
||||||
|
@ -157,8 +161,11 @@ def _replay(self, video_id, webpage, long_video_id, key):
|
||||||
'ext': 'vtt',
|
'ext': 'vtt',
|
||||||
'url': caption['source']}]
|
'url': caption['source']}]
|
||||||
|
|
||||||
return dict(self._get_common_fields(webpage),
|
info = self._get_common_fields(webpage)
|
||||||
id=video_id,
|
info.update({
|
||||||
formats=formats,
|
'id': video_id,
|
||||||
view_count=view_count,
|
'formats': formats,
|
||||||
subtitles=subtitles)
|
'view_count': view_count,
|
||||||
|
'subtitles': subtitles,
|
||||||
|
})
|
||||||
|
return info
|
||||||
|
|
Loading…
Reference in a new issue