|
|
@ -29,6 +29,9 @@ def get_subreddit_threads():
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
passkey = os.getenv("REDDIT_PASSWORD")
|
|
|
|
passkey = os.getenv("REDDIT_PASSWORD")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_step("Getting AskReddit threads...")
|
|
|
|
|
|
|
|
accept_thread = False
|
|
|
|
|
|
|
|
while (accept_thread == False):
|
|
|
|
content = {}
|
|
|
|
content = {}
|
|
|
|
reddit = praw.Reddit(
|
|
|
|
reddit = praw.Reddit(
|
|
|
|
client_id=os.getenv("REDDIT_CLIENT_ID"),
|
|
|
|
client_id=os.getenv("REDDIT_CLIENT_ID"),
|
|
|
@ -66,6 +69,15 @@ def get_subreddit_threads():
|
|
|
|
submission = list(threads)[random.randrange(0, 25)]
|
|
|
|
submission = list(threads)[random.randrange(0, 25)]
|
|
|
|
|
|
|
|
|
|
|
|
print_substep(f"Video will be: {submission.title} :thumbsup:")
|
|
|
|
print_substep(f"Video will be: {submission.title} :thumbsup:")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response = input("Is this thread acceptable? [yes/no/exit]: ").strip().lower()
|
|
|
|
|
|
|
|
if response == "yes" or response == "y":
|
|
|
|
|
|
|
|
accept_thread = TRUE
|
|
|
|
|
|
|
|
elif response == "exit":
|
|
|
|
|
|
|
|
return -1
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
print_step("Getting new AskReddit threads...")
|
|
|
|
|
|
|
|
|
|
|
|
console.log("Getting video comments...")
|
|
|
|
console.log("Getting video comments...")
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
content["thread_url"] = submission.url
|
|
|
|
content["thread_url"] = submission.url
|
|
|
|