Instapy: Question: Session Unfollow User

Created on 17 Feb 2018  路  7Comments  路  Source: timgrossmann/InstaPy

Wanted to get some clarification on the unfollow command. Does it unfollow accounts you have followed using the "session.follow_user_followers". Unless I missed something, I didn't see anything in the readme.

Thank you!

wontfix

Most helpful comment

hi @boldestfortune
currently unfollow_users() feature has unfollow 3 methods

  1. only unfollow users auto-followed by Instapy (_unfollows every user followed by InstaPy, regardless of feature it was followed in..._)
session.unfollow_users(amount=50, onlyInstapyFollowed=True, onlyNotFollowMe=False)
  1. only unfollow users who are not following you (generally)
session.unfollow_users(amount=50, onlyInstapyFollowed=False, onlyNotFollowMe=True)
  1. unfollow everybody (_whether follows you or not..._)
session.unfollow_users(amount=50, onlyInstapyFollowed=False, onlyNotFollowMe=False)

All 7 comments

hi @boldestfortune
currently unfollow_users() feature has unfollow 3 methods

  1. only unfollow users auto-followed by Instapy (_unfollows every user followed by InstaPy, regardless of feature it was followed in..._)
session.unfollow_users(amount=50, onlyInstapyFollowed=True, onlyNotFollowMe=False)
  1. only unfollow users who are not following you (generally)
session.unfollow_users(amount=50, onlyInstapyFollowed=False, onlyNotFollowMe=True)
  1. unfollow everybody (_whether follows you or not..._)
session.unfollow_users(amount=50, onlyInstapyFollowed=False, onlyNotFollowMe=False)

Thank you @uluQulu.
session.unfollow_users(amount=50, onlyInstapyFollowed=True, onlyNotFollowMe=True)

Will running unfollow in this config break the script?

For the example above,
according to the current state of unfollow() function in unfollow_util.py it will only execute onlyInstapyFollowed=True method and leave that unfollow_users() feature

You can actually get other results by changing conditional statements in unfollow() function
Currently there are 3 conditions, from top to down:

if onlyInstapyFollowed is True:

```python
elif onlyInstapyFollowed is False and onlyNotFollowMe is True:

```python
elif onlyNotFollowMe is not True:

And it returns a value only after checking all these conditions..
What you would like to achieve? @boldestfortune

I see. Perhaps I'm confused. Say for example I want instapy to unfollow only the users that the script followed, which are not following me back, and not the users that i have personally followed, who are not following me back.

Does
session.unfollow_users(amount=50, onlyInstapyFollowed=False, onlyNotFollowMe=True)
achieve this?

Nope,

session.unfollow_users(amount=50, onlyInstapyFollowed=True, onlyNotFollowMe=False)

does it

Just keep onlyInstapyFollowed=True, it will not touch other methods even if they are True..

_i understand you, somehow, method names puzzled my mind at first, too_

Great, Thanks for the clarification @uluQulu

This is an amazing script, so a big thanks to the devs & contributors. Keep up the great work.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rahulkapoor90 picture rahulkapoor90  路  3Comments

thisishotdog picture thisishotdog  路  3Comments

CodeMaster1 picture CodeMaster1  路  3Comments

n0sw34r picture n0sw34r  路  3Comments

neomh picture neomh  路  3Comments