feat(youtube): channel / video 透出频道头像,feed / search 透出 channel_avatar / video_id - #2465
Open
huanghe wants to merge 2 commits into
Open
feat(youtube): channel / video 透出频道头像,feed / search 透出 channel_avatar / video_id#2465huanghe wants to merge 2 commits into
huanghe wants to merge 2 commits into
Conversation
InnerTube 的 channelMetadataRenderer.avatar 与 videoOwnerRenderer.thumbnail 一直都在原始 JSON 里,只是没往外传。渲染频道卡片 / 视频卡片的下游不用再为 一张圆头像多打一次请求。 - channel.js:返回对象加 `avatar`(thumbnails 最后一张 = 最大) - video.js:subscribers 那个循环顺手取 owner 的 thumbnail,返回 `channelAvatar` 两个都是追加键,KV 序列化走 Object.entries,老消费者不受影响。
列表类命令的底层 InnerTube 响应里本来就带着频道头像与视频 id,只是没进 columns,下游只能在召回后再打一轮请求补抓。这批改动零新请求、零新登录态, 老列的名字和格式全部保持不变。 - feed / search 补 channel_avatar(lockup 与 videoRenderer 两种版式都覆盖), search 补 video_id;playlist lockup 这类没有头像 / 视频的结果两列为空 - video 的 owner 节点改为在主列递归查找(不会串到推荐位),仍缺失时按 videoDetails.channelId 打一次 InnerTube browse 兜底 channel_avatar / subscribers —— 只在 watch 页没带 videoOwnerRenderer 时才多这一次请求 已重新生成 cli-manifest.json。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
动机
YouTube 列表类命令的底层 InnerTube 响应里本来就带着频道头像与视频 id,只是没往外传。渲染频道卡片 / 视频卡片的下游只能在召回后再为一张头像多打一轮请求。这批改动零新请求、零新登录态,老列的名字和格式全部保持不变,只做追加。
改动
commit 1 — channel / video 透出频道头像
channel:返回对象加avatar(channelMetadataRenderer.avatar最后一张 = 最大)video:取videoOwnerRenderer.thumbnail,返回channelAvatarcommit 2 — feed / search 透出 channel_avatar / video_id,video 补兜底
feed/search补channel_avatar(lockup 与 videoRenderer 两种版式都覆盖),search补video_id;playlist lockup 这类没有头像 / 视频的结果两列为空video的 owner 节点改为在主列递归查找(不会串到推荐位);仍缺失时按videoDetails.channelId打一次 InnerTube browse 兜底channel_avatar/subscribers—— 只在 watch 页没带videoOwnerRenderer时才多这一次请求验证
clis/youtube8 个测试文件 102 个用例通过(新增 feed / search / video 的头像与 video_id 断言)cli-manifest.json已重新生成,check:silent-column-drop无新增违规docs/adapters/browser/youtube.md补充说明