diff --git a/reddit/subreddit.py b/reddit/subreddit.py index 53a95e8..ca7c66f 100644 --- a/reddit/subreddit.py +++ b/reddit/subreddit.py @@ -82,11 +82,12 @@ def get_subreddit_threads(): try: content["thread_url"] = submission.url content["thread_title"] = submission.title - # ontent["thread_content"] = submission.content + # content["thread_content"] = submission.content content["comments"] = [] - for top_level_comment in submission.comments: - if not top_level_comment.stickied and top_level_comment.removed_by_category is not None: # see https://github.com/JasonLovesDoggo/RedditVideoMakerBot/issues/78 + if top_level_comment.body in ["[removed]", "[deleted]"]: + continue # # see https://github.com/JasonLovesDoggo/RedditVideoMakerBot/issues/78 + if not top_level_comment.stickied: if len(top_level_comment.body) <= int(environ["MAX_COMMENT_LENGTH"]): content["comments"].append( {