Early extraction of duration metadata via playlist thumbnail overlay

Early gathering of item video durations from playlist metadata, prior to downloading individual item metadata pages, so that video duration values are (e.g.) shown in `--flat-playlist` or `--simulate`, and/or can be used as a download filtering criterion.
This commit is contained in:
Glenn Slayden 2021-07-06 15:11:46 -07:00 committed by GitHub
parent 3da4918c8b
commit 112e8e4970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,7 +315,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
lambda x: x['title']['simpleText']), compat_str) lambda x: x['title']['simpleText']), compat_str)
description = try_get( description = try_get(
renderer, lambda x: x['descriptionSnippet']['runs'][0]['text'], renderer, lambda x: x['descriptionSnippet']['runs'][0]['text'],
compat_str) compat_str)
duration_text = try_get( duration_text = try_get(
renderer, renderer,
(lambda x: x['lengthText']['simpleText'], (lambda x: x['lengthText']['simpleText'],