A Python script using the Instagrapi library to automatically follow users from a target account's followers list.
- Automated Instagram login with session management
- Two-factor authentication support
- Random delays between actions to avoid rate limiting
- Configurable daily follow limits
- Proxy support (optional)
- Detailed logging and follow session summaries
- Python 3.9+
- Required packages:
- instagrapi
- Pillow
- python-dotenv
- Clone this repository
- Install the required packages: pip install instagrapi Pillow python-dotenv
- Create a
.env
file in the project root with the following variables:
- INSTAGRAM_USERNAME=your_username
- INSTAGRAM_PASSWORD=your_password
- TARGET_INSTAGRAM_USERNAME=target_account
- (Optional) To use a proxy, uncomment and configure the proxy settings in the script.
- Run the Jupyter notebook
auto_follow.ipynb
- Enter your 2FA code when prompted
- The script will:
- Log in to your Instagram account
- Fetch followers from the target account
- Follow random users with delays between actions
- Display a summary of the follow session
- Random delays between actions (2-10 seconds)
- Session management to avoid frequent logins
- Error handling and logging
- Configurable daily follow limits to avoid Instagram restrictions
This tool is for educational purposes only. Using automated scripts with Instagram may violate their terms of service. Use at your own risk.