mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-06 06:45:00 +01:00
Merge 1a351b903e into 7ec6b9bc40
This commit is contained in:
commit
0289c87522
1 changed files with 4 additions and 0 deletions
|
|
@ -4284,6 +4284,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'toggleButtonViewModel', 'toggleButtonViewModel', 'defaultButtonViewModel',
|
'toggleButtonViewModel', 'toggleButtonViewModel', 'defaultButtonViewModel',
|
||||||
'buttonViewModel', 'accessibilityText', {parse_count}), get_all=False)
|
'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'))
|
vcr = traverse_obj(vpir, ('viewCount', 'videoViewCountRenderer'))
|
||||||
if vcr:
|
if vcr:
|
||||||
vc = self._get_count(vcr, 'viewCount')
|
vc = self._get_count(vcr, 'viewCount')
|
||||||
|
|
@ -4292,6 +4294,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
info['concurrent_view_count'] = vc
|
info['concurrent_view_count'] = vc
|
||||||
elif info.get('view_count') is None:
|
elif info.get('view_count') is None:
|
||||||
info['view_count'] = vc
|
info['view_count'] = vc
|
||||||
|
elif get_first(microformats, 'isShortsEligible') and short_views_type == 'seen':
|
||||||
|
info['view_count'] = vc
|
||||||
|
|
||||||
vsir = get_first(contents, 'videoSecondaryInfoRenderer')
|
vsir = get_first(contents, 'videoSecondaryInfoRenderer')
|
||||||
if vsir:
|
if vsir:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue