Prevents unfollow followers who have liked one of your latest X posts
(
self, enabled: bool = False, posts: int = 4, boundary: int = 500
)
| 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 | """ |
nothing calls this directly
no test coverage detected