-
Notifications
You must be signed in to change notification settings - Fork 9k
fix(route/twitter/user): support specify option onlyMedia
#19049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Successfully generated as following: http://localhost:1200/twitter/user/ayatoyofuji/onlyMedia=1 - Failed ❌ |
| if (!include_rts) { | ||
| data = utils.excludeRetweet(data); | ||
| } | ||
| if (only_media) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason that it hasn't been added to user route in clearly stated in #17310.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean I should use list or likes route to only display tweets that contains a media?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSSHub/lib/routes/twitter/api/web-api/constants.ts
Lines 3 to 14 in be620d2
| const graphQLEndpointsPlain = [ | |
| '/graphql/E3opETHurmVJflFsUBVuUQ/UserTweets', | |
| '/graphql/Yka-W8dz7RaEuQNkroPkYw/UserByScreenName', | |
| '/graphql/HJFjzBgCs16TqxewQOeLNg/HomeTimeline', | |
| '/graphql/DiTkXJgLqBBxCs7zaYsbtA/HomeLatestTimeline', | |
| '/graphql/bt4TKuFz4T7Ckk-VvQVSow/UserTweetsAndReplies', | |
| '/graphql/dexO_2tohK86JDudXXG3Yw/UserMedia', | |
| '/graphql/Qw77dDjp9xCpUY-AXwt-yQ/UserByRestId', | |
| '/graphql/UN1i3zUiCWa-6r-Uaho4fw/SearchTimeline', | |
| '/graphql/Pa45JvqZuKcW1plybfgBlQ/ListLatestTweetsTimeline', | |
| '/graphql/QuBlQ6SxNAQCt6-kBiCXCQ/TweetDetail', | |
| ]; |
The likes route seems no effect, there is no graphql about likes route
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops.
Sorry, I didn't notice this paragraph. Thank you for your patient reply.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a condition, the media route not include retweets, so I can't get retweets which contain media.
So, I think add option onlyMedia to the user route have some necessity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This follows X's behaviour as https://x.com/_RSSHub/media does not include retweets as well.
|
Successfully generated as following: http://localhost:1200/twitter/user/ayatoyofuji/onlyMedia=1 - Failed ❌ |
TonyRL
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR can be achieved using built-in common parameters filter_description to include media tweets only using keywords like img|video or twimg
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |

Involved Issue / 该 PR 相关 Issue
Close #
Example for the Proposed Route(s) / 路由地址示例
New RSS Route Checklist / 新 RSS 路由检查表
PuppeteerNote / 说明
/twitter/user路由下,没有添加可选参数
onlyMedia的相关处理逻辑