|
|
|
@ -1,8 +1,6 @@
|
|
|
|
|
from utils.console import print_markdown, print_step, print_substep
|
|
|
|
|
import praw
|
|
|
|
|
import random
|
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
|
import os
|
|
|
|
|
import os, random, praw, re
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_subreddit_threads():
|
|
|
|
@ -37,12 +35,12 @@ def get_subreddit_threads():
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if os.getenv("SUBREDDIT"):
|
|
|
|
|
subreddit = reddit.subreddit(os.getenv("SUBREDDIT"))
|
|
|
|
|
subreddit = reddit.subreddit(re.sub(r"r\/", "", os.getenv("SUBREDDIT")))
|
|
|
|
|
else:
|
|
|
|
|
# ! Prompt the user to enter a subreddit
|
|
|
|
|
try:
|
|
|
|
|
subreddit = reddit.subreddit(
|
|
|
|
|
input("What subreddit would you like to pull from? ")
|
|
|
|
|
re.sub(r"r\/", "", input("What subreddit would you like to pull from? "))
|
|
|
|
|
)
|
|
|
|
|
except ValueError:
|
|
|
|
|
subreddit = reddit.subreddit("askreddit")
|
|
|
|
|