1# Instagram Unfollow Automation Tool
This repository contains a Python tool to automate the "unfollow" action on Instagram using the instagrapi library. The main goal is to simplify the management of followed profiles, allowing users to easily remove profiles they no longer wish to follow.
docker build -t instatool-server . docker run -it --rm instatool-server
- Secure Authentication: Utilizes user-provided Instagram account credentials securely and stores them locally.
- Error Handling: Automatically handles errors during the "unfollow" process, including connection issues, challenge requests (such as Captchas), and other Instagram-imposed limitations.
- Ease of Use: Once configured with the appropriate credentials, the tool automatically performs the "unfollow" action for all profiles that the user is following but are not following back.
-
Credential Management: Stores Instagram account credentials securely in a local file (
secret.txt), ensuring ease of access without exposing sensitive information in the code. -
Automatic Login and Error Handling: Attempts to login to Instagram upon running the script, handling potential challenges (like Captchas) by prompting the user to retry later.
-
Followers and Following Analysis: Retrieves the list of followers and accounts being followed by the user, identifying profiles that do not reciprocate the follow.
-
Unfollow Automation: Automatically unfollows profiles that do not follow back, enhancing user control over their followed list.
-
Follow Automation: Automatically follows profiles that follow you.
-
Clone the repository to your computer:
git clone https://github.com/cyberpeppe/instatool.git
-
Install the necessary dependencies:
pip install -r requirements.txt
-
Make the Bash script executable:
chmod +x instatool.sh
-
Start the Python script to perform the unfollow automation:
./instatool.sh
-
The program will connect to your Instagram account, retrieve the list of your followers and followings, then perform the "unfollow" action for users who are not following you back.
If you are on Windows you don't need Linux: the repository includes simple wrappers to run the Python script from cmd.exe or PowerShell.
- Using Command Prompt (double-click or run from cmd): run
instatool.bat. It will prefer thepylauncher if available, otherwisepython. - Using PowerShell: run
instatool.ps1. You can also runpowershell -ExecutionPolicy Bypass -File .\instatool.ps1if script execution is restricted.
Prerequisites on Windows:
- Python 3.x installed and on PATH, or the Python launcher (
py) installed. - Install dependencies once:
pip install -r requirements.txtNotes:
instatool.ps1andinstatool.batjust rununfollow.pyfrom the repository root. Keepto-unfollow.txtand any output files in the same folder.- If your environment uses
python3as the executable name, editinstatool.bator callpy -3 unfollow.py.
If you would like to contribute to this project, feel free to fork the repository, open issues to report problems or suggest improvements, and propose changes through pull requests. Your contributions are welcome!
This project is released under the MIT. See the LICENSE.txt file for more details.
© 2024 Instatool. Created by cyberpeppe (https://github.com/cyberpeppe).