A small Python script for the Twitter API v2, using tweepy. It answers one question: whom did the people I follow start or stop following?
- It fetches the accounts followed by one account, then for each of those, the accounts they follow.
- Each list is saved as JSON in a folder named after the date.
- Every run compares the newest snapshot with the previous one and writes a plain-text report. For each followed account it lists who was added and who was removed.
- User IDs become names through a local cache, filled in from the API as needed.
The script respects the API rate limits. It refetches a user’s list only when the saved copy is older than three hours, and the root list once a day.