mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-08 10:57:45 +09:00
[ie/1tv] Extract chapters (#15848)
Some checks failed
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Quick Test / Core Test (push) Has been cancelled
Quick Test / Code check (push) Has been cancelled
Release (master) / Publish Github release (push) Has been cancelled
Release (master) / Publish to PyPI (push) Has been cancelled
Release (nightly) / Check for new commits (push) Has been cancelled
Release (nightly) / Publish Github release (push) Has been cancelled
Release (nightly) / Publish to PyPI (push) Has been cancelled
Some checks failed
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Quick Test / Core Test (push) Has been cancelled
Quick Test / Code check (push) Has been cancelled
Release (master) / Publish Github release (push) Has been cancelled
Release (master) / Publish to PyPI (push) Has been cancelled
Release (nightly) / Check for new commits (push) Has been cancelled
Release (nightly) / Publish Github release (push) Has been cancelled
Release (nightly) / Publish to PyPI (push) Has been cancelled
Authored by: hunter-gatherer8
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user