pull/1288/head
Simon 3 years ago
parent 49eb860899
commit 695aba6ace

@ -84,21 +84,19 @@ def get_subreddit_threads(POST_ID: str):
return get_subreddit_threads(POST_ID) # submission already done. rerun
if settings.config["settings"]["storymode"]:
if not submission.selftext and settings.config["reddit"]["thread"]["post_id"] != "":
if not submission.selftext:
print_substep("You are trying to use story mode on post with no post text")
exit()
elif not submission.selftext:
print_substep("You are trying to use story mode on post with no post text") # not allow postid post with no self text it story == true
return get_subreddit_threads(POST_ID)
else:
# Check for the length of the post text
if len(submission.selftext) > (settings.config["settings"]["storymode_max_length"] or 2000):
print_substep(
f"Post is too long ({len(submission.selftext)}), retrying with a different post. ({settings.config['settings']['storymode_max_length']} character limit)"
f"Post is too long ({len(submission.selftext)}), try with a different post. ({settings.config['settings']['storymode_max_length']} character limit)"
)
return get_subreddit_threads(POST_ID)
exit()
elif not submission.num_comments:
return get_subreddit_threads(POST_ID)
print_substep("No comments found. Skipping.")
exit()
submission = check_done(submission) # double-checking

Loading…
Cancel
Save