I'm trying to print out the title along with the content (body) of a random post on a given subreddit. I've been looking around all over the internet on how to do this, but I cant seem to figure it out.
I've written something down here that gets the id of a random submission.
import praw
reddit = praw.Reddit(
client_id = "",
client_secret = "",
password = "",
user_agent = "",
username = "",
)
random_submission = reddit.subreddit('playboicarti').random()
print(random_submission)
Example output:
v206wo
Here it's getting the id of a random submission from the subreddit called playboicarti.
Does anyone know how I'm supposed to print out the title and the content of that submission using the id?