From 51def2de762ead3343246d68d33be031605d4ea8 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 9 Jun 2022 22:00:10 -0400 Subject: [PATCH] fix: fixed deleted comments appearing in video closes #78 --- reddit/subreddit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reddit/subreddit.py b/reddit/subreddit.py index 6a2c273..78fceb1 100644 --- a/reddit/subreddit.py +++ b/reddit/subreddit.py @@ -44,7 +44,7 @@ def get_subreddit_threads(): """ print_step("Getting subreddit threads...") if not getenv( - "SUBREDDIT" + "SUBREDDIT" ): # note to self. you can have multiple subreddits via reddit.subreddit("redditdev+learnpython") subreddit = reddit.subreddit( input("What subreddit would you like to pull from? ") @@ -86,7 +86,7 @@ def get_subreddit_threads(): content["comments"] = [] for top_level_comment in submission.comments: - if not top_level_comment.stickied: + if not top_level_comment.stickied and top_level_comment.removed_by_category is None: # see https://github.com/JasonLovesDoggo/RedditVideoMakerBot/issues/78 if len(top_level_comment.body) <= int(environ["MAX_COMMENT_LENGTH"]): content["comments"].append( {