Skip to content

Commit

Permalink
[vvvvid] skip unplayable episodes and extract akamai formats(closes y…
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine authored and ThirumalaiK committed Jan 28, 2021
1 parent 255c900 commit 2dbe3d9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions youtube_dl/extractor/vvvvid.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def f(m):
embed_code = ds(embed_code)
video_type = video_data.get('video_type')
if video_type in ('video/rcs', 'video/kenc'):
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={
Expand All @@ -163,9 +162,7 @@ def f(m):
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))
formats.extend(self._extract_akamai_formats(embed_code, video_id))
else:
formats.extend(self._extract_wowza_formats(
'http://sb.top-ix.org/videomg/_definst_/mp4:%s/playlist.m3u8' % embed_code, video_id))
Expand Down Expand Up @@ -217,6 +214,8 @@ def _real_extract(self, url):
season_number = int_or_none(season.get('number'))
episodes = season.get('episodes') or []
for episode in episodes:
if episode.get('playable') is False:
continue
season_id = str_or_none(episode.get('season_id'))
video_id = str_or_none(episode.get('video_id'))
if not (season_id and video_id):
Expand Down

0 comments on commit 2dbe3d9

Please sign in to comment.