Compare commits

..

2 Commits

Author SHA1 Message Date
bashonly
93b6da86c2
Update piaulizaportal.py 2023-09-23 22:00:33 +00:00
bashonly
8dc8eb1ad9
Update yt_dlp/extractor/piaulizaportal.py 2023-09-23 22:00:02 +00:00

View File

@ -56,21 +56,15 @@ 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': live_status,
'live_status': {
'video': 'is_live',
'dvr': 'was_live', # short-term archives
}.get(m3u8_type, 'not_live'), # VOD or long-term archives
}