From a6d004759b43d9cbc3c0340f7f737239108c43c0 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 9 Jun 2022 22:47:19 -0400 Subject: [PATCH] fixed video error --- reddit/subreddit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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( {