Instapy: Feature Request: Interact with our Followers

Created on 27 May 2018  路  11Comments  路  Source: timgrossmann/InstaPy

Hello. I'm using your tool for a couple of weeks and its awesome.
Gained lots of followers although i would like to make a request about a new feature.
Instead of "Interact" while we follow. We could introduce the Interact with our own followers.
For example i have 1700 followers.
My feed is showing always the "important once" so the Like by Feeds is not our tool for now.
I used the tool when i had 1200 followers so all the 500 new followers have been randomly received likes cause i used the set_user_interact
but all the 1200 rest that i had before i use this tool could not be "updated" with likes from me.

So what i want to purpose is a function that goes inside our followers list and interact with them.
What is your idea about that?

wontfix

Most helpful comment

Hey you can tweak the existing feature for this ...
use the interact with followers of a specific user function.....
Then put you username in the username section....
That will do the job for Now....

All 11 comments

Hey you can tweak the existing feature for this ...
use the interact with followers of a specific user function.....
Then put you username in the username section....
That will do the job for Now....

@forgottensword You are right about this, although lets say i put an amount of 200 interactions,
somehow InstaPy have to keep a record of the my followers that entered their profile and like some image, so if i run it again it won't have to go again to those 200 people.
Any idea about this? I think i will learn python only for this feature cause its very important to keep your followers too 馃槅

Tweak the onlyfollowme

@sionking what do you mean ?

We scrape our followers to a list to not unfolow whi follow us, ths same list can be used for interaction.

@kwstasna yeah its important to keep followers.. from my experience.. I'm getting new followers from my interactions and losing a lot due to the lack of interactions with the existing ones...

@sionking Actually it would be helpful if you told him how to scrape followers to list

Isn't anyone interested in this?

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

@kwstasna I don't know if you are still interested in this or figured out the way yourself. But, I am posting in case any one is interested.

If you are using instapy to unfollow non-followers (such as unfollow_users), instapy will save the list of your followers in a json file. You can use it to interact with your followers. Below is the example to like 5 posts and comment once for each of your followers. If you have lot of followers you may have to split them into chunks to run on multiple days. REMEMBER TO CHANGE INDEX OF LIST (0 -> 1.. ) fdata in order to move on to next chunk of followers for subsequent runs.

#Liking and commenting on follower's posts
import json
from instapy import InstaPy
from instapy.util import smart_run

#login credentials

insta_username = 'blah'
insta_password = 'blah'

#get followers list and read json file
folfile = "C:/ProgramData/Anaconda3/Scripts/InstaPy/logs/blah/relationship_data/blah/followers/29-11-2018~full~2069.json"
with open(folfile) as f:
    data = json.load(f)

#split the jason file into sizable chunks
n=160 #number of followers to engage in one run
fdata = [data[i:i + n] for i in range(0, len(data), n)]
#print([len(f) for f in fdata])
fdata = fdata[0] ### runs the first chunk; REMEMBER TO CHANGE THE INDEX FOR EVERY RUN
nposts = 5 #posts to like
pertcom = 20 #percent to comment; comment 1 in 5 likes

session = InstaPy(username=insta_username,
                  password=insta_password,
                  headless_browser=False,
                  multi_logs=True)

with smart_run(session):
    session.set_quota_supervisor(enabled=True,
                            sleep_after=["likes", "comments_h"],
                             sleepyhead=True, stochastic_flow=True, notify_me=True,
                             peak_likes=(135, 800),
                             peak_comments=(45, 400))

    print('Going to like ' + str(nposts) + ' posts each of these ' + str(n) +' followers:')
    print(fdata)
    print('Commenting percentage : ' + str(pertcom))
    session.set_comments(['Cool', 'Nice'])
    session.set_do_comment(enabled=True, percentage=pertcom)
    session.set_do_like(True, percentage=100)
    session.interact_by_users(fdata, amount=nposts, randomize=False)

Hi, I am interested in this feature but, in my logs/blah dir, I do not have any relationship_data directory. I just have the following files:

  • followed.txt
  • followerNum.txt
  • followingNum.txt
  • general.log
  • blah_cookie.pkl
  • recordActivity.json
    Therefore I do not know how to retrieve my followers list.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

harrypython picture harrypython  路  3Comments

drcyber975 picture drcyber975  路  3Comments

CharlesCCC picture CharlesCCC  路  3Comments

deronsizemore picture deronsizemore  路  3Comments

Naramsim picture Naramsim  路  3Comments