aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2017-11-29 16:09:45 +0100
committerRemita Amine <remitamine@gmail.com>2017-11-29 16:09:45 +0100
commitfb61b57d0f4c6422b2722f56f5740ea1b19adfcf (patch)
tree6496da3e28eb21b7c45fc2b282d61e9aece0191d /youtube_dl
parent07cf18b9c56bf8ce08404b084672f33e860a805e (diff)
[vvvvid] fix extraction for kenc videos(fixes #13406)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/vvvvid.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vvvvid.py b/youtube_dl/extractor/vvvvid.py
index 656a4b9e5..3d0dc403b 100644
--- a/youtube_dl/extractor/vvvvid.py
+++ b/youtube_dl/extractor/vvvvid.py
@@ -22,6 +22,9 @@ class VVVVIDIE(InfoExtractor):
'ext': 'mp4',
'title': 'Ping Pong',
},
+ 'params': {
+ 'skip_download': True,
+ },
}, {
# video_type == 'video/rcs'
'url': 'https://www.vvvvid.it/#!show/376/death-note-live-action/377/482493/episodio-01',
@@ -31,6 +34,9 @@ class VVVVIDIE(InfoExtractor):
'ext': 'mp4',
'title': 'Episodio 01',
},
+ 'params': {
+ 'skip_download': True,
+ },
}]
_conn_id = None
@@ -116,8 +122,20 @@ class VVVVIDIE(InfoExtractor):
embed_code = ds(embed_code)
video_type = video_data.get('video_type')
if video_type in ('video/rcs', 'video/kenc'):
- formats.extend(self._extract_akamai_formats(
- embed_code, video_id))
+ embed_code = re.sub(r'https?://([^/]+)/z/', r'https://\1/i/', embed_code).replace('/manifest.f4m', '/master.m3u8')
+ if video_type == 'video/kenc':
+ kenc = self._download_json(
+ 'https://www.vvvvid.it/kenc', video_id, query={
+ 'action': 'kt',
+ 'conn_id': self._conn_id,
+ 'url': embed_code,
+ }, fatal=False) or {}
+ kenc_message = kenc.get('message')
+ if kenc_message:
+ embed_code += '?' + ds(kenc_message)
+ formats.extend(self._extract_m3u8_formats(
+ embed_code, video_id, 'mp4',
+ m3u8_id='hls', fatal=False))
else:
formats.extend(self._extract_wowza_formats(
'http://sb.top-ix.org/videomg/_definst_/mp4:%s/playlist.m3u8' % embed_code, video_id))