mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-15 18:12:58 +00:00
[vk] Fix postlive videos extraction
This commit is contained in:
parent
9cdb0a338d
commit
424ed37ec4
@ -245,7 +245,7 @@ class VKIE(VKBaseIE):
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# finished live stream, live_mp4
|
# finished live stream, postlive_mp4
|
||||||
'url': 'https://vk.com/videos-387766?z=video-387766_456242764%2Fpl_-387766_-2',
|
'url': 'https://vk.com/videos-387766?z=video-387766_456242764%2Fpl_-387766_-2',
|
||||||
'md5': '90d22d051fccbbe9becfccc615be6791',
|
'md5': '90d22d051fccbbe9becfccc615be6791',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -392,6 +392,8 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
title = unescapeHTML(data['md_title'])
|
title = unescapeHTML(data['md_title'])
|
||||||
|
|
||||||
|
# 2 = live
|
||||||
|
# 3 = post live (finished live)
|
||||||
is_live = data.get('live') == 2
|
is_live = data.get('live') == 2
|
||||||
if is_live:
|
if is_live:
|
||||||
title = self._live_title(title)
|
title = self._live_title(title)
|
||||||
@ -408,7 +410,8 @@ def _real_extract(self, url):
|
|||||||
for format_id, format_url in data.items():
|
for format_id, format_url in data.items():
|
||||||
if not isinstance(format_url, compat_str) or not format_url.startswith(('http', '//', 'rtmp')):
|
if not isinstance(format_url, compat_str) or not format_url.startswith(('http', '//', 'rtmp')):
|
||||||
continue
|
continue
|
||||||
if format_id.startswith(('url', 'cache')) or format_id in ('extra_data', 'live_mp4'):
|
if (format_id.startswith(('url', 'cache')) or
|
||||||
|
format_id in ('extra_data', 'live_mp4', 'postlive_mp4')):
|
||||||
height = int_or_none(self._search_regex(
|
height = int_or_none(self._search_regex(
|
||||||
r'^(?:url|cache)(\d+)', format_id, 'height', default=None))
|
r'^(?:url|cache)(\d+)', format_id, 'height', default=None))
|
||||||
formats.append({
|
formats.append({
|
||||||
|
Loading…
Reference in New Issue
Block a user