Skip to content
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

Any way to get newest Following first? #164

Open
takabinance opened this issue Apr 9, 2024 · 2 comments
Open

Any way to get newest Following first? #164

takabinance opened this issue Apr 9, 2024 · 2 comments

Comments

@takabinance
Copy link

In the Twitter UI, it lists the newest following accounts first. In twscrape, it lists them in some other order. I am trying to efficiently track new followings for a user so I was thinking of just getting the most recent page rather than having to reload all following each time. So the Twitter UI version is preferable for me.

In api.py, there is:
OP_Following = "PAnE9toEjRfE-4tozRcsfw/Following"

When I look at what Twitter sends (I think), it uses "fV5QhxlYguIHPeHF3SKaqQ/Following".

Like a monkey I just tried swapping that into api.py and it complained about missing features. Realizing I have no idea what I'm doing, is there any way to get the recency-sorted results for Following?

FWIW, this is what I got back when trying to use that other code for following:
[DEV] Update required: (336) The following features cannot be null: tweet_with_visibility_results_prefer_gql_media_interstitial_enabled, rweb_tipjar_consumption_enabled, creator_subscriptions_quote_tweet_preview_enabled, communities_web_enable_tweet_community_results_fetch

And what I saw in console that Twitter sends:
https://twitter.com/i/api/graphql/fV5QhxlYguIHPeHF3SKaqQ/Following?variables=%7B%22userId%22%3A%22226749344%22%2C%22count%22%3A20%2C%22includePromotedContent%22%3Afalse%7D&features=%7B%22rweb_tipjar_consumption_enabled%22%3Afalse%2C%22responsive_web_graphql_exclude_directive_enabled%22%3Atrue%2C%22verified_phone_label_enabled%22%3Afalse%2C%22creator_subscriptions_tweet_preview_api_enabled%22%3Atrue%2C%22responsive_web_graphql_timeline_navigation_enabled%22%3Atrue%2C%22responsive_web_graphql_skip_user_profile_image_extensions_enabled%22%3Afalse%2C%22communities_web_enable_tweet_community_results_fetch%22%3Atrue%2C%22c9s_tweet_anatomy_moderator_badge_enabled%22%3Atrue%2C%22tweetypie_unmention_optimization_enabled%22%3Atrue%2C%22responsive_web_edit_tweet_api_enabled%22%3Atrue%2C%22graphql_is_translatable_rweb_tweet_is_translatable_enabled%22%3Atrue%2C%22view_counts_everywhere_api_enabled%22%3Atrue%2C%22longform_notetweets_consumption_enabled%22%3Atrue%2C%22responsive_web_twitter_article_tweet_consumption_enabled%22%3Atrue%2C%22tweet_awards_web_tipping_enabled%22%3Afalse%2C%22creator_subscriptions_quote_tweet_preview_enabled%22%3Afalse%2C%22freedom_of_speech_not_reach_fetch_enabled%22%3Atrue%2C%22standardized_nudges_misinfo%22%3Atrue%2C%22tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled%22%3Atrue%2C%22tweet_with_visibility_results_prefer_gql_media_interstitial_enabled%22%3Afalse%2C%22rweb_video_timestamps_enabled%22%3Atrue%2C%22longform_notetweets_rich_text_read_enabled%22%3Atrue%2C%22longform_notetweets_inline_media_enabled%22%3Atrue%2C%22responsive_web_enhance_cards_enabled%22%3Afalse%7D

@mokoshalb
Copy link

Update the feature list.

@dedjaa
Copy link

dedjaa commented May 3, 2024

Hey @takabinance did you find a way to get the new followers first ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants