From 49c1a8965801d059abb3cdf8bf48a610277f9fae Mon Sep 17 00:00:00 2001 From: Lewis Menelaws Date: Thu, 2 Jun 2022 14:57:53 -0400 Subject: [PATCH] Fixed merge Issues --- reddit/subreddit.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/reddit/subreddit.py b/reddit/subreddit.py index cd18f6c..5d020fe 100644 --- a/reddit/subreddit.py +++ b/reddit/subreddit.py @@ -5,18 +5,16 @@ from dotenv import load_dotenv import os - def get_subreddit_threads(): """ Returns a list of threads from the AskReddit subreddit. """ - load_dotenv() print_step("Getting AskReddit threads...") - print(os.getenv("REDDIT_2FA")) + if os.getenv("REDDIT_2FA").lower() == "yes": print( "\nEnter your two-factor authentication code from your authenticator app.\n" @@ -37,10 +35,6 @@ def get_subreddit_threads(): username=os.getenv("REDDIT_USERNAME"), password=passkey, ) - askreddit = reddit.subreddit("askreddit") - threads = askreddit.hot(limit=25) - submission = list(threads)[random.randrange(0, 25)] - print_substep(f"Video will be: {submission.title}") if os.getenv("SUBREDDIT"): subreddit = reddit.subreddit(os.getenv("SUBREDDIT"))