Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raymondev/redditanalyst

A python script that gets the posts in r/depression by the top specified redditors of a desired subreddit
https://github.com/raymondev/redditanalyst

jetbrains learn

Last synced: 2 months ago
JSON representation

A python script that gets the posts in r/depression by the top specified redditors of a desired subreddit

Awesome Lists containing this project

README

        

# Reddit Analyst
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](https://www.reddit.com/prefs/apps) to create it
.

## How it works
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.

### Simple explanation of what this code means:
This script shows how many posts in r/depression were published by people who also posted on a specified subreddit

## Example:

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.

![Graph](graph.png)

## Requisites:

PRAW

pip install praw

Beepy

pip install beepy

Matplotlib (for the graph script)

pip install matplotlib

## Installing

- 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.

## How to use:
- 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

### Works for sure on:

- Windows 10 with Python 3.9