Skip to content

Instantly share code, notes, and snippets.

@dev4Fun
Last active February 7, 2020 04:21
Show Gist options
  • Save dev4Fun/4990d5f26ca8434b2f52a58bdf429fdb to your computer and use it in GitHub Desktop.
Save dev4Fun/4990d5f26ca8434b2f52a58bdf429fdb to your computer and use it in GitHub Desktop.
def _compute_comments_to_ignore(self, comments) -> dict:
to_ignore = {}
for comment in comments:
if comment.author and comment.author.name in self.all_bot_names:
to_ignore[comment.id] = comment
for reply in comment.replies:
if reply.author and reply.author.name in self.all_bot_names:
to_ignore[reply.id] = reply
return to_ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment