little changes

pull/280/head
iaacornus 3 years ago
parent 0361c25e39
commit 4020c733ea
No known key found for this signature in database
GPG Key ID: 281739AE7252598C

@ -2,12 +2,12 @@ import random
import os import os
import praw import praw
from utils.console import print_markdown, print_step, print_substep
from dotenv import load_dotenv 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. 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" "\nEnter your two-factor authentication code from your authenticator app.\n"
) )
code = input("> ") code = input("> ")
print()
pw = os.getenv("REDDIT_PASSWORD") pw = os.getenv("REDDIT_PASSWORD")
passkey = f"{pw}:{code}" passkey = f"{pw}:{code}"
else: else:
@ -62,10 +61,9 @@ def get_subreddit_threads():
"comment_id": top_level_comment.id, "comment_id": top_level_comment.id,
} }
) )
except AttributeError as e: except AttributeError as e:
pass pass
print_substep("Received AskReddit threads successfully.", style="bold green") print_substep("AskReddit threads retrieved successfully.", style="bold green")
return content return content

Loading…
Cancel
Save