aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-09-29 23:04:10 +0700
committerSergey M․ <dstftw@gmail.com>2016-09-29 23:04:10 +0700
commit93aa0b631878b62f756c83e1069a14cd2d8775f1 (patch)
treee8dbac35227dc0cc7caec0a8a4db405a98b4420e /youtube_dl/extractor
parent0ce26ef22834587920bd06f3cb32dab4fcef3c2a (diff)
[vk] Add support for finished live streams (#10799)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/vk.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py
index f26e0732c..1d089c9d7 100644
--- a/youtube_dl/extractor/vk.py
+++ b/youtube_dl/extractor/vk.py
@@ -226,7 +226,7 @@ class VKIE(VKBaseIE):
},
'params': {
'skip_download': True,
- }
+ },
},
{
# video key is extra_data not url\d+
@@ -242,6 +242,18 @@ class VKIE(VKBaseIE):
},
},
{
+ # 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
'url': 'http://vk.com/feed?z=video-43215063_166094326%2Fbb50cacd3177146d7a',
'only_matching': True,
@@ -366,7 +378,10 @@ class VKIE(VKBaseIE):
formats = []
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
height = int_or_none(self._search_regex(
r'^(?:url|cache)(\d+)', k, 'height', default=None))