fix: skip posts with no comments

pull/908/head
Callum Leslie 3 years ago
parent d6be83ef80
commit e6169ee905
No known key found for this signature in database
GPG Key ID: D382C4AFEECEAA90

@ -72,7 +72,7 @@ def get_subreddit_threads(POST_ID: str):
threads = subreddit.hot(limit=25) threads = subreddit.hot(limit=25)
submission = get_subreddit_undone(threads, subreddit) submission = get_subreddit_undone(threads, subreddit)
submission = check_done(submission) # double-checking submission = check_done(submission) # double-checking
if submission is None: if submission is None or not submission.num_comments:
return get_subreddit_threads(POST_ID) # submission already done. rerun return get_subreddit_threads(POST_ID) # submission already done. rerun
upvotes = submission.score upvotes = submission.score
ratio = submission.upvote_ratio * 100 ratio = submission.upvote_ratio * 100

Loading…
Cancel
Save