Skip to main content

Unsubscribe bot-like users from the Instagram account

Project description

Copyright (c) 2019 Viktor Krasheninnikov
https://github.com/VikGit/byebyebots-instagram.git

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Description: # ByeByeBots for Instagram
Unsubscribe Instagram accounts who follows to more than _N_ (e.g. 1500) accounts, because they are not only don't see your posts, but also reduce your stats.

## Long story short
Say goodbye to all Internet-shops, follow4follow, and automatically subscribed to you Instagram accounts.

## Long story long
In 2018, Instagram has changed the algorithm and there’s no question about it, Instagram posts are no longer getting the amount of exposure they used to. Now, it’s estimated that only **10%** of your audience is actually seeing your posts.
This can be extremely frustrating for users who aren’t seeing their friends and family’s posts, businesses hoping to reach new customers, and even worse for influencers whose business model depends on their followers seeing their content.

Since the original shift from a chronological feed, we’ve known the Instagram algorithm is mainly based on engagement. This includes number of likes, comments, video views, saves, shared posts, DM’s and any other type of interactions a post gets. More info in the [original post](https://later.com/blog/how-instagram-algorithm-works/).

Imagine you have 150 followers, and average amount of likes on your photos is 50. Having that, Instagram thinks that your posts are interested to only 33% of your followers. Then imagine that 50 of your 150 followers are not real people - bussines accounts, Internet-shops etc. Those accounts are only interested in you seeing them, they are not insterested in your life or posts - we can easily unsubscribe them from us. Thus, you'll have 100 followers and your 50 likes becomes 50% instead of 33%! This will give the instagram a sign that your posts engage more people in activity, and it will more recommend your account for viewing to other people.

## Logic
The tool combines both BeautifulSoup response parsing and unofficial Instagram API developed by [LevPasha](https://github.com/LevPasha/Instagram-API-python). This hepls to reduce number of [429 HTTP responces](https://stackoverflow.com/questions/49606300/instagram-api-request-limit-max-200-only-2018-april) during processing.

To detect who is bot and who's not is pretty complicated nowaday, often bots put a few random likes or comments, to simulate users activity. We can suppose that if account is subscribed to 1500+ accounts - it's a bot-like. With new Instagram alghoritm, this account will see only the top-rated post, and if your are not super star, your posts most probably won't even shown to them.

The logic is straighforward:
1. Get accounts subscribed to you
2. Take away accounts to which you are subscribed
3. Unsubscribe from you accounts with more than _N_ subscriptions

## Installation
The tool was developed and tested with Python 3.7.1, but it should be fine with any 3.x.x.
To install the package from PyPi run:
```
pip3 install byebyebots
```

Alternatively, you can install it from source:
```
git clone git@github.com:VikGit/byebyebots-instagram.git
cd byebyebots-instagram
python3 setup.py install
```

## Usage
```
usage: byebyebots [-h] [-u USER] [-p PASSWORD] [-l LIMIT]
[--email_sender_user EMAIL_SENDER_USER]
[--email_sender_password EMAIL_SENDER_PASSWORD]
[--email_recipient EMAIL_RECIPIENT] [--yes] [--dryrun]

Unsubscribe user with unrealistic number of followings

optional arguments:
-h, --help show this help message and exit
-u USER, --user USER Username fot the Instagram account
-p PASSWORD, --password PASSWORD
Password fot the Instagram account
-l LIMIT, --limit LIMIT
Number of followings which can be considered
unrealistic
--email_sender_user EMAIL_SENDER_USER
Email of service user to deliver notifications
--email_sender_password EMAIL_SENDER_PASSWORD
Password of service user to deliver notifications
--email_recipient EMAIL_RECIPIENT
Password of service user to deliver notifications
--yes Proceed without manul approving of unsubscribe action
--dryrun Replace unsubscribe action with a safe one, for
testing purposes
```

## Examples
Run in interactove dryrun mode to see how many potential bots are going to be unsubscribed. You will be asked to authenticate to Instagram account:
```
byebyebots --dryrun
```

Run in non-interactive mode. Remove `--dryrun` option to proceed with unsubscribing.
```
goodbyebots -u instagram_login -p instagram_password --yes --dryrun
```
In case you decide to run this tool by schedule, it supports email notifications. First, you'll need to create a mailbox for service user - from who you'll receive notifications. If you select Gmail, you'll probably need to [allow this script](https://support.google.com/accounts/answer/6010255) to use that mailbox.
When done, pass service-user credentials to the script and specify your own email - to which you'll send notifications. Remove `--dryrun` option to proceed with unsubscribing.
```
goodbyebots --email_sender_user sender_login@gmail.com --email_sender_pass sender_pass --email_recipient myemail@gmail.com -u instagram_login -p instagram_password --yes --dryrun
```

Keywords: instagram bots unsubscribe
Platform: UNKNOWN

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

byebyebots-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

byebyebots-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file byebyebots-0.1.0.tar.gz.

File metadata

  • Download URL: byebyebots-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for byebyebots-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c94c94e1c64daa0394255b7ca7133989361b597abb2f3aba45e467029b75085
MD5 e2a1c058474bd7dba745fc61851dbe68
BLAKE2b-256 ba7a8772e5639f416db81aef646f4ee9c75fc80acae88562156516e0ab99dfd6

See more details on using hashes here.

File details

Details for the file byebyebots-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: byebyebots-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.7.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for byebyebots-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 242ce1cc1404379561996f3125a4bf862abeb9ecad30a39d435089bed6313f41
MD5 880f0c21e6bb94572b22553091aaa4ba
BLAKE2b-256 dc6f3ae16797e6b96704e42f87db169e9f8be61694b13d32c3d1510de34f48f5

See more details on using hashes here.

Supported by

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