A program to save reddit data to csv files for analytics
- Clone/ Download Repository
- Make sure you have Python3^ installed, either globally or in a virtual environment
You can install them by running
pip install {plugin name}
- mysql-connector-python
- pandas
- plotly
- praw
- numpy
- psutil
- Create folder "Data" in root directory
-Reddit-Analysis --Code ---Python scripts --Data ---generated sub folders
- In "Code" folder rename file file "keys.default.txt", insert your account data:
personal [Reddit API personal token] secret [Reddit API secret token] password [Reddit User Account password] (if you want to connect to ftp server:) ftp-password [password]
- Run Script "Main".
- Currently, it will first start the thread then download the 20 newest posts of the subreddits in the list at the very top.
This version of the program needs the connection to a mySql Database which runs on the user's machine (localhost) The name of the database is 'reddit_analysis', password is nothing.
Simple import "reddit_analysis.sql" and you're good to go.
If you want data to different subreddits, just insert it into the array in main.py
(depracated -> it now gets newest posts by default and updates them continually)
Currently it points at my server, hosted on bplaced. To change this, go into ftp_writer.py
In there just configure the host and username. The next line in the code directs to the directory on the server where the files will be saved.