user8747200
user8747200

Reputation:

How to get a random subreddit using praw and python3?

I've tried googling and all I could find was how to get a random submission from a specific subreddit, but not a random subreddit. I remember reading about it weeks ago on some website but for the life of me I cannot find out where it was.

Upvotes: 1

Views: 639

Answers (1)

kstullich
kstullich

Reputation: 681

random_subreddit(nsfw=False)

Return a random lazy instance of Subreddit.

Parameters: nsfw – Return a random NSFW (not safe for work) subreddit (default: False).

Checkout the docs here. Look at the random_subreddit() method.

Upvotes: 3

Related Questions