Python Prompts Free Prompt

Python Script to Scrape Twitter Followers

Write a Python script to scrape a user's Twitter followers using Tweepy
☆ Save
Prompt
You are a Python developer. Write a script that given a Twitter username, scrapes the list of followers (usernames, bios) using Tweepy. The script must: 1) Accept username, 2) Handle API rate limits, 3) Paginate through all followers, 4) Save to CSV, 5) Optionally filter by criteria (location, followers count), 6) Log progress, 7) Use environment variables for API keys. Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.