Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unfollowery-2.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unfollowery-2.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file unfollowery-2.2.tar.gz.

File metadata

  • Download URL: unfollowery-2.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for unfollowery-2.2.tar.gz
Algorithm Hash digest
SHA256 5bccfb2e4392cfaecf071804bcf4cc3fd90c888c3724734ba2df9d911ef0b4af
MD5 b54b511e6b01e1ed54595cab6f9ef18a
BLAKE2b-256 e0fb05a6c8eac56eea535ede705281ce31a60cbcc3d1f23d7586c3fe571549d3

See more details on using hashes here.

File details

Details for the file unfollowery-2.2-py3-none-any.whl.

File metadata

  • Download URL: unfollowery-2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for unfollowery-2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e89139353762e17fcd739a3c591bc818abb2107b4cc555349d4287faebe62bb
MD5 29aee173c0995139e74f3611a01d0262
BLAKE2b-256 d305db43b3c8d05d7047260ec1ffe27b213cf292d8455d20ec7705ddd9d82935

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page