Skip to content

A program that prints two lists: a list of people that you follow, but don't follow you back, and a list of people that follow you, but that you don't follow back on Instagram, using Selenium

License

Notifications You must be signed in to change notification settings

kyletimmermans/wicked

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version 6.0 Python 3.12 Latest Commit kyletimmermans Twitter

Wicked

A program that prints two lists: a list of people that you follow, but don't follow you back, and a list of people that follow you, but that you don't follow back on Instagram, using Selenium


How it works:

This program scrapes Instagram web pages and uses that data to make requests to Instagram's GraphQL API, in order to create lists of the usernames that follow you and that you follow. By comparing the two lists, it returns all the usernames that are in the "Following" list and are not in your "Followers" list. Essentially, showing you who has not followed you back. It does the same process for showing you who follows you, but you aren't following them back.


How to run it:

  1. Prerequisites: Must have Python3 and Google Chrome on your system
  2. Run: pip3 install -r requirements.txt
  3. Run: python3 Wicked.py
  4. Input your username/email/phone # and password for Instagram (MFA code too, if enabled), and wait a few minutes for it to return the results. Run time is dependant on how many people you follow / follow you

Note:

1. This program does not log your username or password, it simply passes it to the Instagram login form.
2. This program uses HTTPS and TLSv1.3 to send information to Instagram.


Sample Program Output

alt text


Changelog

v1.0: Initial-Release
v2.0:
  -Handle for possible incorrect username and password and re-input them if their incorrect
  -Handle path change for different Operating Systems (Windows, OSX, Linux)
  -Automatically add and then remove a line from 'hosts' file to fix selenium error
v2.1: Added progress bars while loading results
v2.2:
  -Added error handling for not being able to find the host file
  -Added error handling for not finding chromedriver in the same folder as itself
  -Added "Establishing Connection" print line
  -Removed logs showing up in console for Windows
v2.3:
  -Added error handling for no internet connection
  -Added better error handling for chromedriver not found in 'Wicked.py' directory
  -Better error handling for hosts file not found
  -Syntax sugar added, small code cleanup
v2.4:
  -Fixed JavascriptException: Cannot read property 'scrollTo' of null
  -Fixed issue where selenium couldn't find user profile div
  -Fixed issue with output where '1' would randomly show up
v2.5:
  -Added final count of usernames along with Results
  -Fixed issue with accounts that have a 'K' or 'M' in their following/followers number
  -Login page needed to have 'react-root' replaced with 'loginForm'
  -Automatically remove "Headless" from user agent string for the driver (Instagram can block headless ones)
  -Fixed bs4 list iterator
  -Logic for (following - followers) detailed in comments
v3.0:
  -Using TLSv1.2 to send information
  -Added MFA Support
  -Added better correct-login checking
  -Added v3 to the ASCII art title
  -Removed JavaScript that scrolls div (was always changing) and sends scroll key instead
v3.1:
  -Added Python Shebang
  -Added if __name__ == "__main__":
  -Refactor / Moved code into main
  -Removed hard-coded XPATHs
  -Added language chromedriver flag to force en-US
  -Added --version and -v command line flag
v4.0:
  -Added option to take email or phone number instead of just Instagram username
  -Added support for million(s) and just 0 followers / following
  -Using wakepy to prevent program from sleeping and crashing
  -Deal with "Suggested for you" accounts in following modal
  -Bug & Logic fixes
  -Selenium:
    -Switched from executable_path to "service" model
    -Switched to new "find_element(By.)" model
    -No longer clicking follower / following modal, now visits links: instagram.com/{username}/followers
    -Removed hard-coded cursor coordinates system for scrolling modal
    -Using WebDriverWait to wait for elements to show up
v4.1: Print results to a .txt file
v4.5: Now using webdriver-manager to automatically install chromedriver
v4.6:
  -Removed host file manipulation files
  -Regex fixes
v4.7:
  -Switched from getpass to pwinput for password masking
  -Fix failed MFA retry support
  -Scrolling method now requires window resize event to open each time to load followers/following
  -Using TLSv1.3 to send information
v5.0:
  -Added feature to see who you don't follow back
    -Updated banner with new program description
  -Added: -h, -u, --help, --usage flags
  -Fixes to ensure that all following/followers are retrieved properly
    -Removed scrolling method - Switched to intercept & replay XHR
v6.0:
  -Now using GraphQL API endpoints to get follower and following username lists
    -Getting follower and following count done through this API as well

About

A program that prints two lists: a list of people that you follow, but don't follow you back, and a list of people that follow you, but that you don't follow back on Instagram, using Selenium

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages