From 4020c733ea6910c812b4d3364a030a59ec82caaa Mon Sep 17 00:00:00 2001 From: iaacornus Date: Sat, 4 Jun 2022 18:44:20 +0800 Subject: [PATCH] little changes --- reddit/subreddit.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/reddit/subreddit.py b/reddit/subreddit.py index 7a7a5bc..e355d64 100644 --- a/reddit/subreddit.py +++ b/reddit/subreddit.py @@ -2,12 +2,12 @@ import random import os import praw -from utils.console import print_markdown, print_step, print_substep from dotenv import load_dotenv +from utils.console import print_step, print_substep -def get_subreddit_threads(): +def get_subreddit_threads(): """ Returns a list of threads from the AskReddit subreddit. """ @@ -21,7 +21,6 @@ def get_subreddit_threads(): "\nEnter your two-factor authentication code from your authenticator app.\n" ) code = input("> ") - print() pw = os.getenv("REDDIT_PASSWORD") passkey = f"{pw}:{code}" else: @@ -62,10 +61,9 @@ def get_subreddit_threads(): "comment_id": top_level_comment.id, } ) - except AttributeError as e: pass - print_substep("Received AskReddit threads successfully.", style="bold green") + print_substep("AskReddit threads retrieved successfully.", style="bold green") return content