gives user thread stats

This commit is contained in:
null3000 authored and GitHub committed 2022-06-07 01:50:30 +02:00
1 parent 41ebf3b5e5
commit eeeaff0a04
1 file changed
+8 -1
+8 -1
View File
@@ -57,7 +57,14 @@ def get_subreddit_threads():
threads = subreddit.hot(limit=25)
submission = list(threads)[random.randrange(0, 25)]
print_substep(f"Video will be: {submission.title} :thumbsup:")
upvotes=submission.score
ratio=submission.upvote_ratio * 100
num_comments=submission.num_comments
console.log(f"[bold green] Video will be: {submission.title} :thumbsup:")
console.log(f"[bold blue] Thread has " + str(upvotes) + " upvotes")
console.log(f"[bold blue] Thread has a upvote ratio of " + str(ratio) + "%")
console.log(f"[bold blue] Thread has " + str(num_comments) + " comments")
console.log("Getting video comments...")
try:
content["thread_url"] = submission.url