I need to only get the followers I have not fetched before. Currently I can only get the top 200 items or given count but I don't want to get the same data more than once.
How to get only new followers using tweepy?
251 Views Asked by Anjayluh At
2
There are 2 best solutions below
2
Rajiv Baxi
On
followers = tweepy.Cursor(api.get_followers).items()
I just discovered that .items() can be passed a number. So you could do something like:
followers = tweepy.Cursor(api.get_followers).items(50)
Additionally, looking at the API documentation, API.get_followers() method, you can also set the number of followers to go through by passing a value to the count variable.
API.get_followers(*, user_id, screen_name, cursor, count, skip_status, include_user_entities)
API.get_followers(count=50)
The followers are returned in the number that they were added.
Related Questions in TWITTER
- issue with Twitter API :
- Unable to use snscrape
- Unable to like a tweet with using Tweepy and Twitter/X v2 API
- automatic commenting for users on the home page of Twitter
- I have a tweet (X) download that is all code. I'm not a coder and I just want to read the message. Can someone help me do that?
- Web scraping using Selenium (not working)
- Twitter oauth2 link seems correct but not working
- Is logging via selenium blocked by twitter?
- Login with twitter using identity server is not working when using openidconnect
- Apache flume does not run hadoop 3.1.0 Flume 1.11
- How to verify Twitter oauth2.0 access token
- Twitter embedded timeline is showing "Nothing to see here"
- Twitter parsing with Selenium python
- Error in login with twitter function on React Native app
- Nothing is happening after solving FunCaptcha
Related Questions in TWEEPY
- issue with Twitter API :
- get list of followers for my X account using tweepy
- Unable to like a tweet with using Tweepy and Twitter/X v2 API
- Is there a way to include a copied image in Python/Tweepy, I can't seem to do it using Pillow
- Get specific tweet data from twitter API
- 403 Forbidden 453 - You currently have access to a subset of Twitter API V2 endpoints and limited v1.1 endpoints even tho I bougth X Basic paid plan
- tweepy.errors.Forbidden: 403 Forbidden 453
- tweepy.errors.Forbidden: 403 Forbidden - Issue with Twitter API authentication
- Error with tweepy library: 401 Unauthorized
- How to do 3-legged authentication using tweepy for web app
- Why client.search_recent_tweets( ) couldn't get enough number of tweets?
- Python Twitter Bot to post images is not finding image
- Can I still retrieve tweets using the free developer tier in Python?
- Get Comments onto a specific Thread
- Using Tweepy to send a plot and message from my code in Twitter dms
Related Questions in TWITTERAPI-PYTHON
- get list of followers for my X account using tweepy
- Twitter API media upload fails with FileNotFoundError
- Twitter API v2 and v1.1
- tweepy (tweepy.errors.Unauthorized: 401 Unauthorized)
- Twitter API Basic or Free Plan for Scraping Tweets from Twitter?
- Twitter API. Tweets containing the RT keyword on the text do not have retweeted_status attribute on the tweet object
- Do the users lookup in twitter API v2 free version using endpoints GET /2/users/me
- Twitter's Tweepy 403 Error when trying to retrieve account's followers
- TweepyException: Failed to parse JSON payload: Expecting value: line 1 column 1 (char 0)
- How to retrive 100 tweets from a time period on twitter v2 using python utilising next_token
- Twitter APIs Error Python: You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only
- Unable to Auth Twitter V2 to access Followers data. I have basic Subscription
- Why cant I follow using twitter api free version?
- How to retrieve more than a 100 tweets on twitter API V2 using python
- Fetching tweets from Twitter api
Related Questions in STTWITTERAPI
- Twitter API Basic or Free Plan for Scraping Tweets from Twitter?
- Can't add "list:xxxxxxxxxxx" StreamRule to StreamingClient of Twitter API v2
- Adding user list in the StreamingClient in Tweepy
- Unauthorized when attempting to post tweet api v1 (C#)
- Getting tweets of a specific user with public metrics
- Twitter API: when and how long is media_id safe to use after media upload?
- Getting Authorized User Details Using Twitter API using PHP Laravel
- How to get only new followers using tweepy?
- Using Twit to post a video with a bot
- Is there any possibilities to fetch the login details upto the given date in twitter using rest api's?
- Get geo/reverse_geocode Twitter API not working
- Problem uploading image to twitter using bash script with twurl. Keep getting "code: 44" "media_ids parameter is invalid"
- how to get list of users who like my tweet and list of users who quoted retweet my tweet?
- Does Twitter provide any api for reply a tweet or get list of replies
- Twitter quick reply type other than options?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The only way I know how is to cycle through them and follow them if they haven't already been followed. I don't believe it's possible by looking at the API:
https://www.geeksforgeeks.org/python-api-followers-in-tweepy/
Make sure you have the third line for the API:
Here's my snippet for following: