mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-20 09:21:25 +02:00
Compare commits
2 Commits
ef3b135461
...
93b6da86c2
Author | SHA1 | Date | |
---|---|---|---|
|
93b6da86c2 | ||
|
8dc8eb1ad9 |
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user