projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9cdb0a3
)
[vk] Fix postlive videos extraction
author
Sergey M․
<dstftw@gmail.com>
Thu, 29 Dec 2016 21:31:19 +0000
(
04:31
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 29 Dec 2016 21:31:19 +0000
(
04:31
+0700)
youtube_dl/extractor/vk.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vk.py
b/youtube_dl/extractor/vk.py
index 1639cd73acd39067e78298a6ab229d384a58d0d9..6e6c3a0e16361e3ce3120e3200efbcd231c27b86 100644
(file)
--- a/
youtube_dl/extractor/vk.py
+++ b/
youtube_dl/extractor/vk.py
@@
-245,7
+245,7
@@
class VKIE(VKBaseIE):
},
},
{
},
},
{
- # finished live stream, live_mp4
+ # finished live stream,
post
live_mp4
'url': 'https://vk.com/videos-387766?z=video-387766_456242764%2Fpl_-387766_-2',
'md5': '90d22d051fccbbe9becfccc615be6791',
'info_dict': {
'url': 'https://vk.com/videos-387766?z=video-387766_456242764%2Fpl_-387766_-2',
'md5': '90d22d051fccbbe9becfccc615be6791',
'info_dict': {
@@
-258,7
+258,7
@@
class VKIE(VKBaseIE):
},
},
{
},
},
{
- # live stream, hls and rtmp links,most likely already finished live
+ # live stream, hls and rtmp links,
most likely already finished live
# stream by the time you are reading this comment
'url': 'https://vk.com/video-140332_456239111',
'only_matching': True,
# stream by the time you are reading this comment
'url': 'https://vk.com/video-140332_456239111',
'only_matching': True,
@@
-392,6
+392,8
@@
class VKIE(VKBaseIE):
title = unescapeHTML(data['md_title'])
title = unescapeHTML(data['md_title'])
+ # 2 = live
+ # 3 = post live (finished live)
is_live = data.get('live') == 2
if is_live:
title = self._live_title(title)
is_live = data.get('live') == 2
if is_live:
title = self._live_title(title)
@@
-408,7
+410,8
@@
class VKIE(VKBaseIE):
for format_id, format_url in data.items():
if not isinstance(format_url, compat_str) or not format_url.startswith(('http', '//', 'rtmp')):
continue
for format_id, format_url in data.items():
if not isinstance(format_url, compat_str) or not format_url.startswith(('http', '//', 'rtmp')):
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(
r'^(?:url|cache)(\d+)', format_id, 'height', default=None))
formats.append({
height = int_or_none(self._search_regex(
r'^(?:url|cache)(\d+)', format_id, 'height', default=None))
formats.append({