You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sam van der Kris e987dc0ba4 Merge branch 'master' of 1 year ago
.gitignore First commit 1 year ago
LICENSE Added LICENSE 1 year ago Added a small note to 1 year ago First commit 1 year ago



Say you want to generate some random passwords. Truly random passwords. A simple Python script? Not random enough. /dev/urandom? Not random enough. Radioactive decay? NOT ENOUGH. Introducting: Reddit. If you've ever been on Reddit, you will know there's some weird shit, that's why I decided to create a script that generates random numbers between 1 and 10000000000 (1^10) using Reddit post titles as entropy source. It scrapes the titles from the first 10 posts on the new page of a subreddit (you can also set it to /r/all).


  • Python 3
  • praw (Reddit API wrapper, install with pip3 install praw)
  • A Reddit account


First, you have to create an application for your Reddit account here. Just give it any name and redirect uri, set the mode to “script for personal use” and create the app. Copy the client ID (the 14 character string next to the icon) and the client secret (27 character string) somewhere. Now create a (in your redditrng folder) and set these variables:

  • subreddit: (optional) subreddit name without the /r/. Example: the_donald
  • useragent: (optional) user agent for the script
  • client_id: your client ID
  • client_secret: your client secret
  • username: your Reddit username
  • password: your Reddit password

Now, install praw if you haven't already using pip install praw or pip3 install praw, depending on your OS (I belive it's pip on Windows and pip3 on most Linux distro's).

You're done! Now you can just run and enjoy your random numbers. Oh, just one thing: you may not want to use this on subreddits where every post has to have to same title, like /r/meirl or /r/catsstandingup. Oh, and please don't actually use this to generate important random stuff.


RedditRNG is licensed under the MIT license, praw uses BSD simplified.