mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 17:41:01 +01:00
[ted] Extract duration (closes #4155)
This commit is contained in:
parent
7a8cbc72b2
commit
eb4cb42a02
@ -38,6 +38,7 @@ class TEDIE(SubtitlesInfoExtractor):
|
|||||||
'actively fooling us.'),
|
'actively fooling us.'),
|
||||||
'uploader': 'Dan Dennett',
|
'uploader': 'Dan Dennett',
|
||||||
'width': 854,
|
'width': 854,
|
||||||
|
'duration': 1308,
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.ted.com/watch/ted-institute/ted-bcg/vishal-sikka-the-beauty-and-power-of-algorithms',
|
'url': 'http://www.ted.com/watch/ted-institute/ted-bcg/vishal-sikka-the-beauty-and-power-of-algorithms',
|
||||||
@ -57,6 +58,7 @@ class TEDIE(SubtitlesInfoExtractor):
|
|||||||
'title': 'Be passionate. Be courageous. Be your best.',
|
'title': 'Be passionate. Be courageous. Be your best.',
|
||||||
'uploader': 'Gabby Giffords and Mark Kelly',
|
'uploader': 'Gabby Giffords and Mark Kelly',
|
||||||
'description': 'md5:5174aed4d0f16021b704120360f72b92',
|
'description': 'md5:5174aed4d0f16021b704120360f72b92',
|
||||||
|
'duration': 1128,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.ted.com/playlists/who_are_the_hackers',
|
'url': 'http://www.ted.com/playlists/who_are_the_hackers',
|
||||||
@ -178,6 +180,7 @@ def _talk_info(self, url, video_name):
|
|||||||
'description': self._og_search_description(webpage),
|
'description': self._og_search_description(webpage),
|
||||||
'subtitles': video_subtitles,
|
'subtitles': video_subtitles,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
'duration': talk_info.get('duration'),
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_available_subtitles(self, video_id, talk_info):
|
def _get_available_subtitles(self, video_id, talk_info):
|
||||||
|
Loading…
Reference in New Issue
Block a user