Interact with the likers of given user's posts. set_do_comment, set_do_follow and set_do_like are applicable. :param usernames: List of users with whose likers to interact. :param posts_grab_amount: Amount of posts to get the likers from per given user. :pa
(
self,
usernames: list,
posts_grab_amount: int = 3,
interact_likers_per_post: int = 3,
randomize: bool = False,
)
| 3264 | return self |
| 3265 | |
| 3266 | def interact_user_likers( |
| 3267 | self, |
| 3268 | usernames: list, |
| 3269 | posts_grab_amount: int = 3, |
| 3270 | interact_likers_per_post: int = 3, |
| 3271 | randomize: bool = False, |
| 3272 | ): |
| 3273 | """ |
| 3274 | Interact with the likers of given user's posts. |
| 3275 | |
| 3276 | set_do_comment, set_do_follow and set_do_like are applicable. |
| 3277 | |
| 3278 | :param usernames: List of users with whose likers to interact. |
| 3279 | :param posts_grab_amount: Amount of posts to get the likers from per given user. |
| 3280 | :param interact_likers_per_post: Amount of likers to be interacted with per post. |
| 3281 | :param randomize: If followers should be chosen randomly. |
| 3282 | """ |
| 3283 | |
| 3284 | if self.aborting: |
| 3285 | return self |
| 3286 | |
| 3287 | if self.do_follow is not True and self.do_like is not True: |
| 3288 | self.logger.info( |
| 3289 | "Please enable following or liking in settings in order to " |
| 3290 | "do interactions." |
| 3291 | ) |
| 3292 | return self |
| 3293 | |
| 3294 | elif self.user_interact_amount <= 0: |
| 3295 | self.logger.info( |
| 3296 | "Please choose an amount higher than zero in " |
| 3297 | "`set_user_interact` in order to do interactions." |
| 3298 | ) |
| 3299 | return self |
| 3300 | |
| 3301 | if not isinstance(usernames, list): |
| 3302 | usernames = [usernames] |
| 3303 | |
| 3304 | if posts_grab_amount > 12: |
| 3305 | self.logger.info( |
| 3306 | "Sorry, you can only grab likers from first 12 posts for " |
| 3307 | "given username now.\n" |
| 3308 | ) |
| 3309 | posts_grab_amount = 12 |
| 3310 | |
| 3311 | interacted_all = 0 |
| 3312 | not_valid_users = 0 |
| 3313 | simulated_unfollow = 0 |
| 3314 | |
| 3315 | # hold the current global values for differentiating at the end |
| 3316 | liked_init = self.liked_img |
| 3317 | already_liked_init = self.already_liked |
| 3318 | commented_init = self.commented |
| 3319 | followed_init = self.followed |
| 3320 | inap_img_init = self.inap_img |
| 3321 | |
| 3322 | self.quotient_breach = False |
| 3323 |
nothing calls this directly
no test coverage detected