Skip to content

Commit

Permalink
fix: the bot did not inform about the skip in case of the filter on m…
Browse files Browse the repository at this point in the history
…utual friends or on the link in bio
  • Loading branch information
mastrolube committed Nov 6, 2021
1 parent 1ad4eaa commit 15c3cbd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions GramAddict/core/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,21 @@ def check_profile(self, device, username):
f"Checking if that user has at least {field_mutual_friends} mutual friends."
)
if profile_data.mutual_friends < field_mutual_friends:
logger.info(
f"@{username} has less then {field_mutual_friends} mutual friends, skip.",
extra={"color": f"{Fore.CYAN}"},
)
return profile_data, self.return_check_profile(
username, profile_data, SkipReason.LT_MUTUAL
)

if field_skip_if_link_in_bio:
logger.debug("Checking if account has link in bio...")
if profile_data.link_in_bio is not None:
logger.info(
f"@{username} has a link in bio, skip.",
extra={"color": f"{Fore.CYAN}"},
)
return profile_data, self.return_check_profile(
username, profile_data, SkipReason.HAS_LINK_IN_BIO
)
Expand Down

0 comments on commit 15c3cbd

Please sign in to comment.