diff options
author | middlingphys <38708390+middlingphys@users.noreply.github.com> | 2024-07-06 07:31:16 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 22:31:16 +0000 |
commit | 2a1a1b8e67e864289ac7ba5d05ec63dbb19a639f (patch) | |
tree | d293baf8f0bfef40fad03950fed744f3c713e6ee | |
parent | c1c9bb4adb42d0d93a2fb5d93a7de0a87b6ba884 (diff) |
[ie/abematv] Extract availability (#10348)
Authored by: middlingphys
-rw-r--r-- | yt_dlp/extractor/abematv.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yt_dlp/extractor/abematv.py b/yt_dlp/extractor/abematv.py index 293a6c40e..9471df1da 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 |