breuerfelix / jinsta

javascript + instagram + algorithms
MIT License
60 stars 13 forks source link

topic: following / unfollowing #25

Open breuerfelix opened 4 years ago

breuerfelix commented 4 years ago

hey guys,

before implementing this feature, we should discuss it a little bit.

implementing following is kinda easy but you dont wanna end up with 1000 accounts you have to manually unfollow.

so the question here is not the following, but the unfollowing!

what is your idea on how to implement the following / unfollowing feature??

my idea:

problem:

how and when to unfollow someone who doesnt post smth in your timeline ?
question: how would you as a user do this in instagram ?
because i wanna simulate all requests that needed to be done to unfollow someone as if you would do it in the normal app.

ghost commented 4 years ago

if i know who i want to unfollow, i usually look for them through the explore page, click them and remove them

jeremycjang commented 4 years ago

I also believe the explore page (search bar) would be more viable than having the bot scroll the timeline, especially since followed users would all post at different frequencies. If it can grab the name from the list, paste it in the search bar, select the correct user then unfollow from there that would be ideal

trooperas commented 4 years ago

I unfollow people who dont follow me back after 3-4 days and sometimes i unfollow people like this:

  1. Go to my followers
  2. Click on profiles without stories (sinc they arem ore likely to be inactive)
  3. See when the account had its last post
  4. If its over a threshold date, unfollow.

Its not so efficient, but it gets me nice amount of inactive people to unfollow.

papillon-unix commented 4 years ago

Hi @breuerfelix, congrats for this new project, and thank you! On Instapy, I was unfollowing non-mutal followers after 3 days and mutual after 4 days, excluding users that have liked one of my last 3 posts. It was also excluding a given list of friends with who the bot should never interract ; no likes and no unfollow. Do you think something like this could be possible?

ghost commented 4 years ago

FYI, I only unfollow non-followers. If they don't follow me, I don't want to follow them. That's an MVP for me.

pavbro commented 4 years ago

I think the best solution is to automatic unfollow users who didnt follow me after N days. Put it to the config please. Another option should be "unfollow everybody" (even those who follow me).

And it would be nice if you will put all followings to the file.

Also, it would be nice if you can implement some mysql driver connection, for those who collect followings to the MYSQL db. It will be perfect.

This file or MySQL table should have next data:

followingUserID Timestamp Status(default=0)

And on the next bot start it will check followers and this file or table (with Status=0), if some of followings folow me back and become followers now - set Status to 1 for them. If not, check timestamp and config N unfollow days setting. If its time to unfollow - unfollow them and set it Status = 2. It should stay in some database (file or table) to prevent second following.

breuerfelix commented 4 years ago

@apaticmusic well i wont be integrating mysql right from the start. i will just insert the followed people as json format into a file in the workspace.

but i will fire an event so that you are able to subscribe to this event in the advanced configuration and insert them in a mysql database just as you wish :)

that way everybody will be happy because some people want sql some want mongodb ... it would be dumb to create drivers for every single database :D so the best option i see here is providing hooks in the first step :) if some people (like you) programmed some good mysql integration with the help of these hooks, we can see if we will be integrating it into the lib itself. but in the first step i wanna keep it as basic as i can but provide as much functionality as possible with the advanced configuration :)

hope this seems fair to you

redstang33 commented 4 years ago

here's what I used to do on InstaPy:

dpereira411 commented 4 years ago

I like your idea. You can check if the user usually posts stuff before following him. As fallback to your approach, you can do something like: every rand(5, 10 days) go through following list and unfollow users that you have been following for more than rand(x, y days) and have not been posting or meet a specific criteria

an rigid follow - unfollow after x days is easier to detect as a bot and we should do something different

vinivst commented 4 years ago

I usually make this fair more simple:

1) Go to my following list 2) Order by oldest 3) Skip a list of users that i don't want to unfollow 4) Skip a list of users that had interacted with me (likes, comments, dm, etc) within last few days 5) Start unfollowing untill i have the pre-determined number of unfollows.

Hope it helps.