Instapy: Feature - Don't follow previously Unfollowed Users

Created on 1 Dec 2017  路  18Comments  路  Source: timgrossmann/InstaPy

One feature I had wanted from Instapy was to make it not follow someone again that's been previously unfollowed through Instapy.

I decided to code it during my free time and I think it is now ready.

I'm not sure how I should share it with others here so that it can be tested on other systems and OSs as well. (I'm quite new to programming and not that familiar with git/github). Could someone please guide me?

feature request

Most helpful comment

Hi @converge, from what I understand, the blacklist campaign can be used for liking and commenting which might happen several times with the same person under different campaigns.

However, unfollowing doesn't have this kind of repetitiveness to it. Like I wouldn't want to keep following, unfollowing, following and unfollowing the same person again and again, irrespective of campaigns.

So the feature I've created is actually a separate blacklist to store all unfollowed users and then, when following, if session.set_dont_follow_previously_unfollowed(enabled = True)
then, it'll loop through the unfollowed blacklist to check if the user we are about to follow has been previously unfollowed. If yes, then it'll skip, else it'll go ahead and follow.

All 18 comments

I have done all the coding and commits in a separate local git branch

Isn't already implemented as a Json file ?

I'm not sure, but I think the Json feature is to Unfollow only those who aren't following us back.

The feature I'm talking about is to not follow someone whom we've previously unfollowed in some previous session. This is so that people don't keep getting notifications that we've followed them again and again

@converge can confirm about the Json file

hey @arjunmurali1993 , you can use blacklist feature for that, check it out:
https://github.com/timgrossmann/InstaPy#blacklist-campaign

Hi @converge, from what I understand, the blacklist campaign can be used for liking and commenting which might happen several times with the same person under different campaigns.

However, unfollowing doesn't have this kind of repetitiveness to it. Like I wouldn't want to keep following, unfollowing, following and unfollowing the same person again and again, irrespective of campaigns.

So the feature I've created is actually a separate blacklist to store all unfollowed users and then, when following, if session.set_dont_follow_previously_unfollowed(enabled = True)
then, it'll loop through the unfollowed blacklist to check if the user we are about to follow has been previously unfollowed. If yes, then it'll skip, else it'll go ahead and follow.

@arjunmurali1993 , youre right. I thought I made blacklist respect followings as well. The easier way is to implement it at blacklist feature.

Sure @converge. Let me know if I can help in any way :)

You can provide the code here I will test it

Arjun, I am very interested in this feature. Could you provide the code or indicate where the changes are made? Would love to incorporate it into my modded version of InstaPy.

Hi @sionking and @squigglesMcW, like I mentioned previously I'm not really familiar with the functioning of GitHub. I have the changes as a git branch on my system. How can I share it? Should I fork and commit to the forked github page?

I have commited my files to a branch on a fork in my account

What happened to this feature? is it available for public?

@TiborMuc I've made it available in a branch on a fork of Instapy in my account. You can check it out if interested.

@arjunmurali1993
I am using your InstaPy-DontFollowPreviouslyUnfollowed branch which returns the following error - any idea what I have to do...?

C:\Users\AdministratorGoogle Drive\ServerShare\GitHub\InstaPy-DontFollowPreviou
slyUnfollowed>py quickstart.py
Traceback (most recent call last):
File "quickstart.py", line 1, in
from instapy import InstaPy
File "C:\Users\AdministratorGoogle Drive\ServerShare\GitHub\InstaPy-DontFollo
wPreviouslyUnfollowed\instapy__init__.py", line 1, in
from .instapy import InstaPy
File "C:\Users\AdministratorGoogle Drive\ServerShare\GitHub\InstaPy-DontFollo
wPreviouslyUnfollowed\instapy\instapy.py", line 1510
if enabled is True:
^
TabError: inconsistent use of tabs and spaces in indentation

Indentation seems fine on that line actually. Everything's also working fine on my computer. Can you paste the function starting in line 1506 of instapy.py here @TiborMuc

@arjunmurali1993 can you please elaborate as to which files or lines should be updated to incorporate this awesome feature?

Inactive issue, reopen if you need assistance.

Was this page helpful?
0 / 5 - 0 ratings