Unfollow the people you follow easily with python and selenium
Make sure to have the webdriver
added to path or copy the webdriver.exe
to the current folder (current working directory)
For Login Info
- You can make a text file named
login.txt
and include the email address in the first line, password in the second line and the profile link in the third line
youemail@address.com
yourpassword123
https://instagram.com/@yourusername
- You can make a
json
file namedlogin.json
with a the key names"email"
,"password"
,"profile_link"
{
"email": "youemail@address.com",
"password": "yourpassword123",
"profile_link": "https://instagram.com/@yourusername"
}
- Start the script with
python instauf.py
- Copy the
instauf.py
to the current working directory
from instauf import InstagramUnfollower # 2. Importing the class from `instauf.py`
obj = InstagramUnfollower() # 3. Initializing the imported class
obj.startUnfollowing() # 4. Running a function
- Copy the
instauf.py
to the current working directory
# import
from instauf import InstagramUnfollower
obj = InstagramUnfollower()
# Setters for required values
# if no value is passed to these functions,
# they will ask the user for the value from an `input("...")`
obj.setEmail("value@passed.com")
obj.setPassword()
obj.setProfileLink()
# Start to unfollow
obj.unFollowInstagram()
- Copy the
instauf.py
to the current working directory
from instauf import InstagramUnfollower
obj = InstagramUnfollower()
obj.clear()
filename = obj.checkFile()
if not(filename is None):
logininfo = obj.loadFile()
else:
logininfo = None
if logininfo is None:
obj.setEmail()
obj.setPassword()
obj.setProfileLink()
else:
obj.loadDict(email=logininfo["email"],
password=logininfo["password"],
profile_link=logininfo["profile_link"])
obj.unFollowInstagram()
- or use sys.argv or argparse to even create a nice CLI application
run the commands below, line by line
sudo pacman -Syyuu --noconfirm
sudo pacman -S git python python-pip --noconfirm
cd ~
git clone https://github.com/hirusha-adi/Instagram-Unfollow.git
cd Instagram-Unfollow
pip3 install -r requirements.txt
python3 instauf.py
run the commands below, line by line
sudo apt install && sudo apt upgrade -y
sudo apt install git python3 python3-pip -y
cd ~
git clone https://github.com/hirusha-adi/Instagram-Unfollow.git
cd Instagram-Unfollow
pip3 install -r requirements.txt
python3 instauf.py
- Download and install Python3. Make sure to 'Add to PATH' when install python3
- Download the code as a .zip file from this Github Reposotory
(this above image might not be the same)
- Extract the downloaded
.zip
file - open
cmd
in that folder - run
pip install -r requirements.txt
- run
python instauf.py
to start the program