MCPcopy
hub / github.com/InstaPy/InstaPy / set_dont_unfollow_active_users

Method set_dont_unfollow_active_users

instapy/instapy.py:4459–4478  ·  view source on GitHub ↗

Prevents unfollow followers who have liked one of your latest X posts

(
        self, enabled: bool = False, posts: int = 4, boundary: int = 500
    )

Source from the content-addressed store, hash-verified

4457 return
4458
4459 def set_dont_unfollow_active_users(
4460 self, enabled: bool = False, posts: int = 4, boundary: int = 500
4461 ):
4462 """Prevents unfollow followers who have liked one of
4463 your latest X posts"""
4464
4465 if self.aborting:
4466 return
4467
4468 # do nothing
4469 if not enabled:
4470 return
4471
4472 # list of users who liked our media
4473 active_users = get_active_users(
4474 self.browser, self.username, posts, boundary, self.logger
4475 )
4476
4477 # include active user to not unfollow list
4478 self.dont_include.update(active_users)
4479
4480 def set_blacklist(self, enabled: bool, campaign: str):
4481 """

Callers

nothing calls this directly

Calls 1

get_active_usersFunction · 0.85

Tested by

no test coverage detected