feat(twitter): 读命令透出 author_avatar / views / media_durations,视频直链取最高码率 - #2467
Open
huanghe wants to merge 1 commit into
Open
feat(twitter): 读命令透出 author_avatar / views / media_durations,视频直链取最高码率#2467huanghe wants to merge 1 commit into
huanghe wants to merge 1 commit into
Conversation
…视频直链取最高码率 推文 GraphQL 响应里本来就带着作者头像、浏览量和每条媒体的时长,只是没进 columns;视频直链则一直取到最低码率变体。这批改动零新请求、零新登录态, 老列的名字和格式全部保持不变。 - extractMedia 按 bitrate 取最高码率 mp4。此前 find(mp4) 取的是第一个变体, 而 X 按码率升序返回,直链恒为 480x270 - extractMedia 新增 media_durations(毫秒,与 media_urls 1:1 对齐,图片为 0), 这是推文视频时长的唯一来源;落到全部带媒体的命令与 quoted_tweet - list-tweets / thread 补 views,list-tweets / thread / search 补 author_avatar(_normal → _400x400) - thread 的 FEATURES 补 view_counts_everywhere_api_enabled,否则 TweetDetail 根本不返 views.count,views 恒为 '0' 已重新生成 cli-manifest.json,silent-column-drop gate 无新增违规。
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.
动机
推文 GraphQL 响应里本来就带着作者头像、浏览量和每条媒体的时长,只是没进 columns;视频直链则一直取到最低码率变体(480x270)。这批改动零新请求、零新登录态,老列的名字和格式全部保持不变。
改动
extractMedia按 bitrate 取最高码率 mp4。此前find(mp4)取的是第一个变体,而 X 按码率升序返回,直链恒为 480x270extractMedia新增media_durations(毫秒,与media_urls1:1 对齐,图片为 0),这是推文视频时长的唯一来源;落到全部带媒体的命令与quoted_tweetlist-tweets/thread补views(与search同形:数字字符串,X 没给时为'0');list-tweets/thread/search补author_avatar(_normal→_400x400)thread的 FEATURES 补view_counts_everywhere_api_enabled,否则 TweetDetail 根本不返views.count,views恒为'0'验证
clis/twitter560 个用例通过(shared / list-tweets / search / thread / tweets 等补断言)cli-manifest.json已重新生成,check:silent-column-drop无新增违规docs/adapters/browser/twitter.md补充说明