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 requires Python 3.7.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.0.4.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: byebyebots-0.0.4.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.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for byebyebots-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e0c064a0075ef2520df3fe51b3c136ab79ad369effa1a937b0cd20a84c1f0bf1
MD5 a53ef2d8a0045ce68261ec50083f8f96
BLAKE2b-256 aa6dcfa704965ffef3d1353ac6aa60e19bbda6c869cce1008ea6e84156196329

See more details on using hashes here.

File details

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

File metadata

  • Download URL: byebyebots-0.0.4-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.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for byebyebots-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 61d6c178089d7d2770d4657f5a0b5d00cac05427d27869b51e1fa35078714fb9
MD5 b877e53341252ce35147b3311604a5a6
BLAKE2b-256 2818c688e2d063080cf296fcdeb8a2c5ca4d62a6b6e35ec7f8b4c18d2a8d87a2

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