1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 17:08:32 +00:00
This commit is contained in:
Rico 2025-06-17 14:43:36 +02:00 committed by GitHub
commit 8f2a2ff40c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4195,6 +4195,8 @@ def process_language(container, base_url, lang_code, sub_name, client_name, quer
'toggleButtonViewModel', 'toggleButtonViewModel', 'defaultButtonViewModel',
'buttonViewModel', 'accessibilityText', {parse_count}), get_all=False)
short_views_type = self._configuration_arg('short_views_type', ['engaged'])[0].lower()
vcr = traverse_obj(vpir, ('viewCount', 'videoViewCountRenderer'))
if vcr:
vc = self._get_count(vcr, 'viewCount')
@ -4203,6 +4205,8 @@ def process_language(container, base_url, lang_code, sub_name, client_name, quer
info['concurrent_view_count'] = vc
elif info.get('view_count') is None:
info['view_count'] = vc
elif get_first(microformats, 'isShortsEligible') and short_views_type == 'seen':
info['view_count'] = vc
vsir = get_first(contents, 'videoSecondaryInfoRenderer')
if vsir: