This Python script automates the process of unfollowing Instagram accounts by sorting the followings list from oldest to newest and unfollowing them in that order. Please use this script responsibly and be aware of Instagram's limitations to avoid potential restrictions on your account.
- Logs in to your Instagram account.
- Extracts and sorts your followings list.
- Automatically unfollows accounts based on the specified order.
- Python 3.x
- Chrome browser
- ChromeDriver (matching your Chrome browser version)
-
Clone the repository:
git clone https://github.com/masoudv/instagram-unfollow-automation.git cd instagram-unfollow-automation
-
Install dependencies: Make sure you have the necessary Python libraries installed. You can install them using:
pip install selenium beautifulsoup4
-
Download ChromeDriver:
- Download the ChromeDriver for your operating system here.
- Make sure the version matches your installed Chrome browser version.
- Place the downloaded
chromedriver
file in the project folder or update the path in the script.
-
Configure your login credentials: Open
instagram_unfollow.py
and replace the following variables with your Instagram login details:username = "your_username" password = "your_password"
-
Run the script:
python instagram_unfollow.py
-
Adjust the unfollow limit: By default, the script will unfollow only the first 10 accounts for testing purposes. You can modify this limit in the code:
for following in followings[:10]: # Adjust the limit as needed unfollow_user(following)
- Rate Limits: Instagram imposes rate limits, so unfollowing too many users in a short time can result in temporary or permanent restrictions. It’s recommended to keep unfollowing sessions moderate.
- Responsibility: This script is for educational purposes only. Use it responsibly and be aware of Instagram's rules.
- Privacy: Ensure your login information is stored securely. Avoid sharing sensitive details in public repositories.
This project is not affiliated with Instagram and is for educational purposes only. Use at your own risk.