|
|
@ -1,10 +1,8 @@
|
|
|
|
from webbrowser import get
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from click import style
|
|
|
|
|
|
|
|
from utils.console import print_markdown, print_step, print_substep
|
|
|
|
from utils.console import print_markdown, print_step, print_substep
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
import os, random, praw, re
|
|
|
|
import os, random, praw, re
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_subreddit_threads():
|
|
|
|
def get_subreddit_threads():
|
|
|
|
global submission
|
|
|
|
global submission
|
|
|
|
"""
|
|
|
|
"""
|
|
|
@ -13,7 +11,6 @@ def get_subreddit_threads():
|
|
|
|
|
|
|
|
|
|
|
|
load_dotenv()
|
|
|
|
load_dotenv()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if os.getenv("REDDIT_2FA", default="no").casefold() == "yes":
|
|
|
|
if os.getenv("REDDIT_2FA", default="no").casefold() == "yes":
|
|
|
|
print(
|
|
|
|
print(
|
|
|
|
"\nEnter your two-factor authentication code from your authenticator app.\n"
|
|
|
|
"\nEnter your two-factor authentication code from your authenticator app.\n"
|
|
|
@ -48,7 +45,11 @@ def get_subreddit_threads():
|
|
|
|
# ! Prompt the user to enter a subreddit
|
|
|
|
# ! Prompt the user to enter a subreddit
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
subreddit = reddit.subreddit(
|
|
|
|
subreddit = reddit.subreddit(
|
|
|
|
re.sub(r"r\/", "", input("What subreddit would you like to pull from? "))
|
|
|
|
re.sub(
|
|
|
|
|
|
|
|
r"r\/",
|
|
|
|
|
|
|
|
"",
|
|
|
|
|
|
|
|
input("What subreddit would you like to pull from? "),
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
except ValueError:
|
|
|
|
except ValueError:
|
|
|
|
subreddit = reddit.subreddit("askreddit")
|
|
|
|
subreddit = reddit.subreddit("askreddit")
|
|
|
|