|Sam van der Kris e987dc0ba4 Merge branch 'master' of gitlab.com:WarKitteh/redditrng||1 year ago|
|.gitignore||1 year ago|
|LICENSE||1 year ago|
|README.md||1 year ago|
|redditrng.py||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).
pip3 install praw)
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 config.py (in your redditrng folder) and set these variables:
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 redditrng.py 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.