summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/abematv.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:47 +0000
commit758b91fc8e496672e9cd6d130c8a8d3445254610 (patch)
treeb22d02f7490d8f68b54c177f33e815faf2a260dc /yt_dlp/extractor/abematv.py
parentAdding debian version 2024.07.02-1. (diff)
downloadyt-dlp-758b91fc8e496672e9cd6d130c8a8d3445254610.tar.xz
yt-dlp-758b91fc8e496672e9cd6d130c8a8d3445254610.zip
Merging upstream version 2024.07.07.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/abematv.py')
-rw-r--r--yt_dlp/extractor/abematv.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yt_dlp/extractor/abematv.py b/yt_dlp/extractor/abematv.py
index 293a6c4..9471df1 100644
--- a/yt_dlp/extractor/abematv.py
+++ b/yt_dlp/extractor/abematv.py
@@ -368,6 +368,7 @@ class AbemaTVIE(AbemaTVBaseIE):
info['episode_number'] = epis if epis < 2000 else None
is_live, m3u8_url = False, None
+ availability = 'public'
if video_type == 'now-on-air':
is_live = True
channel_url = 'https://api.abema.io/v1/channels'
@@ -389,6 +390,7 @@ class AbemaTVIE(AbemaTVBaseIE):
if 3 not in ondemand_types:
# cannot acquire decryption key for these streams
self.report_warning('This is a premium-only stream')
+ availability = 'premium_only'
info.update(traverse_obj(api_response, {
'series': ('series', 'title'),
'season': ('season', 'name'),
@@ -408,6 +410,7 @@ class AbemaTVIE(AbemaTVBaseIE):
headers=headers)
if not traverse_obj(api_response, ('slot', 'flags', 'timeshiftFree'), default=False):
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'
else:
@@ -425,6 +428,7 @@ class AbemaTVIE(AbemaTVBaseIE):
'description': description,
'formats': formats,
'is_live': is_live,
+ 'availability': availability,
})
return info