mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-09 12:42:28 +01:00
[vk] Add support for finished live streams (#10799)
This commit is contained in:
parent
0ce26ef228
commit
93aa0b6318
@ -226,7 +226,7 @@ class VKIE(VKBaseIE):
|
|||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# video key is extra_data not url\d+
|
# video key is extra_data not url\d+
|
||||||
@ -241,6 +241,18 @@ class VKIE(VKBaseIE):
|
|||||||
'view_count': int,
|
'view_count': int,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# finished live stream, live_mp4
|
||||||
|
'url': 'https://vk.com/videos-387766?z=video-387766_456242764%2Fpl_-387766_-2',
|
||||||
|
'md5': '90d22d051fccbbe9becfccc615be6791',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '456242764',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'ИгроМир 2016 — день 1',
|
||||||
|
'uploader': 'Игромания',
|
||||||
|
'duration': 5239,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
# removed video, just testing that we match the pattern
|
# removed video, just testing that we match the pattern
|
||||||
'url': 'http://vk.com/feed?z=video-43215063_166094326%2Fbb50cacd3177146d7a',
|
'url': 'http://vk.com/feed?z=video-43215063_166094326%2Fbb50cacd3177146d7a',
|
||||||
@ -366,7 +378,10 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
if not k.startswith('url') and not k.startswith('cache') and k != 'extra_data' or not v:
|
if (not k.startswith('url') and not k.startswith('cache')
|
||||||
|
and k not in ('extra_data', 'live_mp4')):
|
||||||
|
continue
|
||||||
|
if not isinstance(v, compat_str) or not v.startswith('http'):
|
||||||
continue
|
continue
|
||||||
height = int_or_none(self._search_regex(
|
height = int_or_none(self._search_regex(
|
||||||
r'^(?:url|cache)(\d+)', k, 'height', default=None))
|
r'^(?:url|cache)(\d+)', k, 'height', default=None))
|
||||||
|
Loading…
Reference in New Issue
Block a user