Skip to content

Conversation

@wakou
Copy link
Contributor

@wakou wakou commented May 8, 2025

Involved Issue / 该 PR 相关 Issue

Close #

Example for the Proposed Route(s) / 路由地址示例

/twitter/user/ayatoyofuji/onlyMedia=1

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

/twitter/user路由下,没有添加可选参数onlyMedia的相关处理逻辑

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

Successfully generated as following:

http://localhost:1200/twitter/user/ayatoyofuji/onlyMedia=1 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/user/:id/:routeParams?
Full Route: /twitter/user/ayatoyofuji/onlyMedia=1
Node Version: v22.15.0
Git Hash: b16cb343

if (!include_rts) {
data = utils.excludeRetweet(data);
}
if (only_media) {
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

@wakou wakou closed this May 8, 2025
@wakou wakou reopened this May 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

Successfully generated as following:

http://localhost:1200/twitter/user/ayatoyofuji/onlyMedia=1 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>ConfigNotFoundError: Twitter API is not configured
Route: /twitter/user/:id/:routeParams?
Full Route: /twitter/user/ayatoyofuji/onlyMedia=1
Node Version: v22.15.0
Git Hash: c59988ea

Copy link
Collaborator

@TonyRL TonyRL left a 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

@TonyRL TonyRL closed this Jun 5, 2025
@wakou wakou deleted the fix/twitter branch July 4, 2025 08:22
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants