[ie/abematv] fix episode availability extraction

This commit is contained in:
middlingphys 2024-07-26 18:52:36 +09:00
parent 28d485714f
commit 258e7e64fc

View File

@ -377,8 +377,7 @@ def _real_extract(self, url):
f'https://api.abema.io/v1/video/programs/{video_id}', video_id,
note='Checking playability',
headers=headers)
ondemand_types = traverse_obj(api_response, ('terms', ..., 'onDemandType'))
if 3 not in ondemand_types:
if not traverse_obj(api_response, ('label', 'free'), default=False):
# cannot acquire decryption key for these streams
self.report_warning('This is a premium-only stream')
availability = 'premium_only'