Compare commits

..

No commits in common. "93b6da86c2ea27eea27d42a90e14f7cadea1c3bf" and "ef3b135461eabb78cedb4b4a44104456d7626ae8" have entirely different histories.

View File

@ -56,15 +56,21 @@ class PIAULIZAPortalIE(InfoExtractor):
r'["\'](https://vms-api\.p\.uliza\.jp/v1/prog-index\.m3u8[^"\']+)', player_data,
'm3u8 url', default=None),
video_id, fatal=False)
m3u8_type = self._search_regex(
r'/hls/(dvr|video)/', traverse_obj(formats, (0, 'url')), 'm3u8 type', default=None)
if m3u8_type == 'video':
live_status = 'is_live'
elif m3u8_type == 'dvr':
# short-term archives.
live_status = 'was_live'
else:
# VoD or long-term archives.
live_status = 'not_live'
return {
'id': video_id,
'title': self._html_extract_title(webpage),
'formats': formats,
'live_status': {
'video': 'is_live',
'dvr': 'was_live', # short-term archives
}.get(m3u8_type, 'not_live'), # VOD or long-term archives
'live_status': live_status,
}