A python script that gets the posts in r/depression by the top specified redditors of a desired subreddit
.
Before using the script, you need to create your own Reddit App, and enter the Client ID and the secret token in the specified section of the code. Click here to create it
.
This script gets the top specified redditors (from hot) that posted on a desired subreddit and analizes their account to see if they ever posted on r/depression. Then, returns the number of all the posts of those users in r/depression. The script can be slightly modified to show the posts of the users, simply uncomment line __ of the main.py file.
It also displays the amount of time that my computer took to analyze every subreddit.
This repository also includes a graph.py script, that, after specifying the needed info, graphs your results. In a future update, I will combine both of them.
This script shows how many posts in r/depression were published by people who also posted on a specified subreddit
I tried my code with some subreddits that I thought they would be interesting to see the results and made a graph out of it.
PRAW
pip install praw
Beepy
pip install beepy
Matplotlib (for the graph script)
pip install matplotlib
- Download or clone the repository.
- Install the requirements in "requirements.txt"
- Execute the main.py Python file (with launcher.bat or witht any other prefered method)
- A command prompt window should appear.
- Create the reddit bot
- Execute the script (a command prompt window should appear)
- Introduce the desired subbredit to analyse.
- Press enter
- Wait until the programm makes a sound.
- Press enter. A txt file will be created with the exact same information as the terminal.
- (optional) Graph the info with the graph.py file
- Windows 10 with Python 3.9