Allows to follow by any scrapped list
(
self,
followlist: list,
times: int = 1,
sleep_delay: int = 600,
interact: bool = False,
)
| 1144 | return self |
| 1145 | |
| 1146 | def follow_by_list( |
| 1147 | self, |
| 1148 | followlist: list, |
| 1149 | times: int = 1, |
| 1150 | sleep_delay: int = 600, |
| 1151 | interact: bool = False, |
| 1152 | ): |
| 1153 | """Allows to follow by any scrapped list""" |
| 1154 | if not isinstance(followlist, list): |
| 1155 | followlist = [followlist] |
| 1156 | |
| 1157 | if self.aborting: |
| 1158 | self.logger.info(">>> self aborting prevented") |
| 1159 | # return self |
| 1160 | |
| 1161 | # standalone means this feature is started by the user |
| 1162 | standalone = ( |
| 1163 | True if "follow_by_list" not in self.internal_usage.keys() else False |
| 1164 | ) |
| 1165 | # skip validation in case of it is already accomplished |
| 1166 | users_validated = ( |
| 1167 | True |
| 1168 | if not standalone and not self.internal_usage["follow_by_list"]["validate"] |
| 1169 | else False |
| 1170 | ) |
| 1171 | |
| 1172 | self.follow_times = times or 0 |
| 1173 | |
| 1174 | followed_all = 0 |
| 1175 | followed_new = 0 |
| 1176 | already_followed = 0 |
| 1177 | not_valid_users = 0 |
| 1178 | |
| 1179 | # hold the current global values for differentiating at the end |
| 1180 | liked_init = self.liked_img |
| 1181 | already_liked_init = self.already_liked |
| 1182 | commented_init = self.commented |
| 1183 | inap_img_init = self.inap_img |
| 1184 | |
| 1185 | relax_point = random.randint(7, 14) # you can use some plain value |
| 1186 | # `10` instead of this quitely randomized score |
| 1187 | self.quotient_breach = False |
| 1188 | |
| 1189 | for acc_to_follow in followlist: |
| 1190 | if self.jumps["consequent"]["follows"] >= self.jumps["limit"]["follows"]: |
| 1191 | self.logger.warning( |
| 1192 | "--> Follow quotient reached its peak!\t~leaving " |
| 1193 | "Follow-By-Tags activity\n" |
| 1194 | ) |
| 1195 | # reset jump counter before breaking the loop |
| 1196 | self.jumps["consequent"]["follows"] = 0 |
| 1197 | # turn on `quotient_breach` to break the internal iterators |
| 1198 | # of the caller |
| 1199 | self.quotient_breach = True if not standalone else False |
| 1200 | break |
| 1201 | |
| 1202 | if follow_restriction( |
| 1203 | "read", acc_to_follow, self.follow_times, self.logger |
no test coverage detected