mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 07:06:52 +01:00
parent
c1c9bb4adb
commit
2a1a1b8e67
@ -368,6 +368,7 @@ def _real_extract(self, url):
|
|||||||
info['episode_number'] = epis if epis < 2000 else None
|
info['episode_number'] = epis if epis < 2000 else None
|
||||||
|
|
||||||
is_live, m3u8_url = False, None
|
is_live, m3u8_url = False, None
|
||||||
|
availability = 'public'
|
||||||
if video_type == 'now-on-air':
|
if video_type == 'now-on-air':
|
||||||
is_live = True
|
is_live = True
|
||||||
channel_url = 'https://api.abema.io/v1/channels'
|
channel_url = 'https://api.abema.io/v1/channels'
|
||||||
@ -389,6 +390,7 @@ def _real_extract(self, url):
|
|||||||
if 3 not in ondemand_types:
|
if 3 not in ondemand_types:
|
||||||
# cannot acquire decryption key for these streams
|
# cannot acquire decryption key for these streams
|
||||||
self.report_warning('This is a premium-only stream')
|
self.report_warning('This is a premium-only stream')
|
||||||
|
availability = 'premium_only'
|
||||||
info.update(traverse_obj(api_response, {
|
info.update(traverse_obj(api_response, {
|
||||||
'series': ('series', 'title'),
|
'series': ('series', 'title'),
|
||||||
'season': ('season', 'name'),
|
'season': ('season', 'name'),
|
||||||
@ -408,6 +410,7 @@ def _real_extract(self, url):
|
|||||||
headers=headers)
|
headers=headers)
|
||||||
if not traverse_obj(api_response, ('slot', 'flags', 'timeshiftFree'), default=False):
|
if not traverse_obj(api_response, ('slot', 'flags', 'timeshiftFree'), default=False):
|
||||||
self.report_warning('This is a premium-only stream')
|
self.report_warning('This is a premium-only stream')
|
||||||
|
availability = 'premium_only'
|
||||||
|
|
||||||
m3u8_url = f'https://vod-abematv.akamaized.net/slot/{video_id}/playlist.m3u8'
|
m3u8_url = f'https://vod-abematv.akamaized.net/slot/{video_id}/playlist.m3u8'
|
||||||
else:
|
else:
|
||||||
@ -425,6 +428,7 @@ def _real_extract(self, url):
|
|||||||
'description': description,
|
'description': description,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'is_live': is_live,
|
'is_live': is_live,
|
||||||
|
'availability': availability,
|
||||||
})
|
})
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user