twscrape icon indicating copy to clipboard operation
twscrape copied to clipboard

Any way to get newest Following first?

Open takabinance opened this issue 10 months ago • 2 comments

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

takabinance avatar Apr 09 '24 18:04 takabinance

Update the feature list.

mokoshalb avatar Apr 11 '24 20:04 mokoshalb

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

dedjaa avatar May 03 '24 00:05 dedjaa

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 31 '24 01:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Sep 14 '24 01:09 github-actions[bot]