MCPcopy
hub / github.com/InstaPy/InstaPy / follow_user_followers

Method follow_user_followers

instapy/instapy.py:3635–3821  ·  view source on GitHub ↗

Follow the `Followers` of given users

(
        self,
        usernames: list,
        amount: int = 10,
        randomize: bool = False,
        interact: bool = False,
        sleep_delay: int = 600,
    )

Source from the content-addressed store, hash-verified

3633 return self
3634
3635 def follow_user_followers(
3636 self,
3637 usernames: list,
3638 amount: int = 10,
3639 randomize: bool = False,
3640 interact: bool = False,
3641 sleep_delay: int = 600,
3642 ):
3643 """Follow the `Followers` of given users"""
3644 if self.aborting:
3645 return self
3646
3647 message = "Starting to follow user `Followers`.."
3648 highlight_print(self.username, message, "feature", "info", self.logger)
3649
3650 if not isinstance(usernames, list):
3651 usernames = [usernames]
3652
3653 followed_all = 0
3654 followed_new = 0
3655 not_valid_users = 0
3656
3657 # below, you can use some static value `10` instead of random ones..
3658 relax_point = random.randint(7, 14)
3659
3660 # hold the current global values for differentiating at the end
3661 already_followed_init = self.already_followed
3662 liked_init = self.liked_img
3663 already_liked_init = self.already_liked
3664 commented_init = self.commented
3665 inap_img_init = self.inap_img
3666
3667 self.quotient_breach = False
3668
3669 for index, user in enumerate(usernames):
3670 if self.quotient_breach:
3671 break
3672
3673 self.logger.info(
3674 "User '{}' [{}/{}]".format((user), index + 1, len(usernames))
3675 )
3676
3677 try:
3678 person_list, simulated_list = get_given_user_followers(
3679 self.browser,
3680 self.username,
3681 user,
3682 amount,
3683 self.dont_include,
3684 randomize,
3685 self.blacklist,
3686 self.follow_times,
3687 self.simulation,
3688 self.jumps,
3689 self.logger,
3690 self.logfolder,
3691 )
3692

Callers

nothing calls this directly

Calls 8

validate_user_callMethod · 0.95
feature_in_featureMethod · 0.95
follow_by_listMethod · 0.95
highlight_printFunction · 0.85
get_given_user_followersFunction · 0.85
unfollow_userFunction · 0.85
sleepFunction · 0.85
truncate_floatFunction · 0.85

Tested by

no test coverage detected