mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-01-26 02:36:53 +00:00
[abc:iview] extract chapters
This commit is contained in:
parent
81f217b552
commit
37ab29ad70
|
@ -198,6 +198,19 @@ class ABCIViewIE(InfoExtractor):
|
||||||
'season': 'Season 1',
|
'season': 'Season 1',
|
||||||
'episode_number': 1,
|
'episode_number': 1,
|
||||||
'episode': 'Wood For The Trees',
|
'episode': 'Wood For The Trees',
|
||||||
|
'duration': 1584,
|
||||||
|
'chapters': [
|
||||||
|
{
|
||||||
|
'start_time': 0,
|
||||||
|
'end_time': 1,
|
||||||
|
'title': '<Untitled Chapter 1>',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'start_time': 1,
|
||||||
|
'end_time': 24,
|
||||||
|
'title': 'opening-credits',
|
||||||
|
},
|
||||||
|
],
|
||||||
'thumbnail': 'https://cdn.iview.abc.net.au/thumbs/i/co/CO1211V001S00_5ad8353f4df09_1280.jpg',
|
'thumbnail': 'https://cdn.iview.abc.net.au/thumbs/i/co/CO1211V001S00_5ad8353f4df09_1280.jpg',
|
||||||
'timestamp': 1690403700,
|
'timestamp': 1690403700,
|
||||||
},
|
},
|
||||||
|
@ -335,12 +348,15 @@ def tokenize_url(url, token):
|
||||||
'thumbnail', expected_type=str, get_all=False)
|
'thumbnail', expected_type=str, get_all=False)
|
||||||
series_id = traverse_obj(
|
series_id = traverse_obj(
|
||||||
video_params, ('analytics', 'oztam', 'seriesId'), 'seriesHouseNumber') or video_id[:7]
|
video_params, ('analytics', 'oztam', 'seriesId'), 'seriesHouseNumber') or video_id[:7]
|
||||||
|
chapters = traverse_obj(
|
||||||
|
video_params, ('cuePoints', ..., {'start_time': 'start', 'end_time': 'end', 'title': 'type'}))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': video_params.get('description'),
|
'description': video_params.get('description'),
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
|
'chapters': chapters,
|
||||||
'duration': int_or_none(traverse_obj(video_params, 'duration', 'eventDuration')),
|
'duration': int_or_none(traverse_obj(video_params, 'duration', 'eventDuration')),
|
||||||
'timestamp': parse_iso8601(video_params.get('pubDate'), ' '),
|
'timestamp': parse_iso8601(video_params.get('pubDate'), ' '),
|
||||||
'series': unescapeHTML(video_params.get('seriesTitle')),
|
'series': unescapeHTML(video_params.get('seriesTitle')),
|
||||||
|
|
Loading…
Reference in a new issue