This Python script edits any Reddit comments older than x amount of days to "." and then deletes them.
-SYSTEM CONFIGURATION-
-
Install Python 3.
-
Install praw by running the following code in terminal:
pip install praw
-REDDIT CONFIGURATION-
-
Navigate to https://www.reddit.com/prefs/apps
-
Click "Create application" at the bottom of the page
-
Select "script"
-
Fill out the discription, and both URL and URI fields (you can point both fields to this Github page)
-
Click 'create app'
-SCRIPT CONFIGURATION-
Once your app is created, you will see your client ID, and secret. Both are highlighted below:
-
When the script is executed, you will be prompted to enter your Client ID, secret, username and password.
-
The last prompt will ask you how old the comments should be that are being deleted. For example, if you enter "4", all comments older than 4 days old will be deleted.
-RUNNING THE SCRIPT-
- Copy commentCleaner.py code into notepad and save it in whatevery directory you prefer as commentCleaner.py, alternatively you can copy the repository using the following command in Windows terminal:
git clone https://github.com/905timur/RedditCommentCleaner.git
- In Windows terminal, navigate to wherever you saved the commentCleaner.py by using the "cd" command, for example:
cd C:\commentCleaner
- Once in the same directory as commentCleaner.py, run the following command:
python commentCleaner.py
- Fill out all the prompts.
Do you want to run the script? (yes/no):
Credentials
- client_id
- client_secret
- username
- password
Run options
1. Remove all comments older than x days
2. Remove comments with negative karma
3. Remove comments with 1 karma and no replies
4. Quit
- Once you have filled out all the prompts, the script will run and delete all comments in the selected category. It will return a txt file with all the comments that were deleted.
For further suggestions or questions, please contact me or open an issue on this repository.

