1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 17:08:32 +00:00

[ie/youtube] extract translated info

This commit is contained in:
kclauhk 2025-06-02 23:24:36 +08:00
parent 4e7c1ea346
commit 62cb64cbb3

View File

@ -4204,8 +4204,16 @@ def process_language(container, base_url, lang_code, sub_name, client_name, quer
elif info.get('view_count') is None:
info['view_count'] = vc
if self._preferred_lang:
info['title'] = traverse_obj(
vpir, ('title', 'runs', 0, 'text', {str}), default=info['title'])
vsir = get_first(contents, 'videoSecondaryInfoRenderer')
if vsir:
if self._preferred_lang:
info['description'] = traverse_obj(
vsir, ('attributedDescription', 'content', {str}), default=info['description'])
vor = traverse_obj(vsir, ('owner', 'videoOwnerRenderer'))
info.update({
'channel': self._get_text(vor, 'title'),