A feature-rich command-line audio/video downloader
[ie/1tv] Extract chapters (#15848)
hunter-gatherer823c059a455ac
diff --git a/yt_dlp/extractor/firsttv.py b/yt_dlp/extractor/firsttv.pyindex 86ad7d7a19..de8218399e 100644--- a/yt_dlp/extractor/firsttv.py+++ b/yt_dlp/extractor/firsttv.py@@ -3,10 +3,12 @@ import urllib.parsefrom .common import InfoExtractorfrom ..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,