aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2021-03-19 12:37:22 +0100
committerRemita Amine <remitamine@gmail.com>2021-03-19 12:37:22 +0100
commitfa6bf0a7112e83d36567072985d56440bb34de72 (patch)
tree375fd269059f3ceac34650ba964ad9fc1befff91
parentf912d6c8cf5a68d576abe4426e12554c3404a7dd (diff)
[vvvvid] fix kenc format extraction(closes #28473)
-rw-r--r--youtube_dl/extractor/vvvvid.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/youtube_dl/extractor/vvvvid.py b/youtube_dl/extractor/vvvvid.py
index 7c94c4ee2..bc196f8a0 100644
--- a/youtube_dl/extractor/vvvvid.py
+++ b/youtube_dl/extractor/vvvvid.py
@@ -182,17 +182,20 @@ class VVVVIDIE(InfoExtractor):
if not embed_code:
continue
embed_code = ds(embed_code)
- if video_type in ('video/rcs', 'video/kenc'):
- 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)
+ if video_type == 'video/kenc':
+ embed_code = re.sub(r'https?(://[^/]+)/z/', r'https\1/i/', embed_code).replace('/manifest.f4m', '/master.m3u8')
+ 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))
+ elif video_type == 'video/rcs':
formats.extend(self._extract_akamai_formats(embed_code, video_id))
elif video_type == 'video/youtube':
info.update({