1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-02-07 14:37:01 +00:00

[ie/1tv] Extract chapters (#15848)

Authored by: hunter-gatherer8
This commit is contained in:
hunter-gatherer8
2026-02-06 22:45:47 +02:00
committed by GitHub
parent 6f38df31b4
commit 23c059a455

View File

@@ -3,10 +3,12 @@ import urllib.parse
from .common import InfoExtractor
from ..utils import (
determine_ext,
float_or_none,
int_or_none,
join_nonempty,
mimetype2ext,
parse_qs,
unescapeHTML,
unified_strdate,
url_or_none,
)
@@ -107,6 +109,11 @@ class FirstTVIE(InfoExtractor):
'timestamp': ('dvr_begin_at', {int_or_none}),
'upload_date': ('date_air', {unified_strdate}),
'duration': ('duration', {int_or_none}),
'chapters': ('episodes', lambda _, v: float_or_none(v['from']) is not None, {
'start_time': ('from', {float_or_none}),
'title': ('name', {str}, {unescapeHTML}),
'end_time': ('to', {float_or_none}),
}),
}),
'id': video_id,
'formats': formats,