diff --git a/reddit_newsletter.py b/reddit_newsletter.py index 248182a..ca4627b 100644 --- a/reddit_newsletter.py +++ b/reddit_newsletter.py @@ -39,7 +39,7 @@ def scrape_reddit(max_comments_per_post=7): post.comments.replace_more(limit=0) # Load top-level comments only comments = post.comments.list() if max_comments_per_post is not None: - comments = comments[:7] + comments = comments[:max_comments_per_post] for comment in comments: post_data["comments"].append(comment.body)