mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-20 17:31:25 +02:00
Compare commits
No commits in common. "93b6da86c2ea27eea27d42a90e14f7cadea1c3bf" and "ef3b135461eabb78cedb4b4a44104456d7626ae8" have entirely different histories.
93b6da86c2
...
ef3b135461
|
@ -56,15 +56,21 @@ class PIAULIZAPortalIE(InfoExtractor):
|
||||||
r'["\'](https://vms-api\.p\.uliza\.jp/v1/prog-index\.m3u8[^"\']+)', player_data,
|
r'["\'](https://vms-api\.p\.uliza\.jp/v1/prog-index\.m3u8[^"\']+)', player_data,
|
||||||
'm3u8 url', default=None),
|
'm3u8 url', default=None),
|
||||||
video_id, fatal=False)
|
video_id, fatal=False)
|
||||||
|
|
||||||
m3u8_type = self._search_regex(
|
m3u8_type = self._search_regex(
|
||||||
r'/hls/(dvr|video)/', traverse_obj(formats, (0, 'url')), 'm3u8 type', default=None)
|
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 {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': self._html_extract_title(webpage),
|
'title': self._html_extract_title(webpage),
|
||||||
'formats': formats,
|
'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