This commit is contained in:
Glenn Slayden 2024-08-21 23:33:14 -03:00 committed by GitHub
commit d78ff861e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -327,8 +327,12 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
description = try_get(
renderer, lambda x: x['descriptionSnippet']['runs'][0]['text'],
compat_str)
duration = parse_duration(try_get(
renderer, lambda x: x['lengthText']['simpleText'], compat_str))
duration_text = try_get(
renderer,
(lambda x: x['lengthText']['simpleText'],
lambda x: x['thumbnailOverlays'][0]['thumbnailOverlayTimeStatusRenderer']['text']['simpleText']),
compat_str)
duration = parse_duration(duration_text)
view_count_text = try_get(
renderer, lambda x: x['viewCountText']['simpleText'], compat_str) or ''
view_count = str_to_int(self._search_regex(