Socket
Socket
Sign inDemoInstall

unfollowery

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unfollowery

For generating Instagram followers/unfollowers of the user in a list & file (without using Instagram API)


Maintainers
1

Unfollowery

For generating Instagram followers/unfollowers of the user in a list & file (without using Instagram API)

Install

pip install unfollowery

Usage

Examples

Import the package and create Profile class instance:

from unfollowery import Profile


# Obviously change USERNAME and
# PASSWORD with the real ones...
user = Profile(username='USERNAME', password='PASSWORD)
  • Get the list of current followers:
followers = user.followers()
  • Get the list of unfollowers since the last check:
unfollowers = user.unfollowers()
  • Get dict ({[DATE]: [list(USERNAMES)]}) of all time unfollowers since the first check:
all_time_unfollowers = user.unfollowery()
  • Get unfollowers dict ({[DATE]: [list(USERNAMES)}) from the specific date check:
unfollowers_by_date = user.unfollowery(datekey='yyyymmdd')

RECOMMENDED: Place your Instagram USERNAME and PASSWORD in the file (probably JSON) somewhere else and import it into your working file to not get displayed in the text editor.

Class: Profile

Please see Examples for initializing Instagram user's Profile class object.

Parameters:
  • username (str) : User's Instagram username
  • password (str) : The user's password string
  • sleep_time (float) - optional : Adjust waiting time (seconds) between some of the actions. It will still get randomized (~sleep_time). Default value = 5
  • logs (bool) - optional : If set to True, Selenium and Chromedriver logs will be displayed in the terminal. Default value = False

Methods: followers() VS unfollowers()

The method unfollowers() WILL NOT return any usernames if [USERNAME]_latest_followers.csv file does not exists. If it exists unfollowers() will compare the usernames from [USERNAME]_latest_followers.csv to the current followers, updates (appends) [USERNAME]_unfollowery.csv and updates (overwrites) [USERNAME]_latest_followers.csv.

However, followers() WILL ALWAYS return the list of the current Instagram followers.

Either one of them will create (IF THE FILES DO NOT EXIST) both [USERNAME]_latest_followers.csv - the list of the current followers and [USERNAME]_unfollowery.csv - the empty file to be filled (in the future) with the users that have unfollowed you.

NOTE: The more followers the user has, the more time followers() and unfollowers() methods take to work.

Method: unfollowery()

This method is for getting a dict {[DATE]: [list(USERNAMES)} object which contains all time (since the first check) unfollowers. However, one can give it a date yyyymmdd argument as written above in the Examples section.

Keep in Mind

These methods may fail due to the updates on Instagram’s website, since it is crawler-based (Selenium) package, so if you encounter any problems, please open an issue or contact me.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc