// This bot is specifically made for subreddit hoarders :)
UnsubBot is a Python script that allows users to quickly unfollow all the subreddits they are subscribed to on Reddit using the Reddit API (PRAW).
- Python 3.x
- PRAW (Python Reddit API Wrapper)
- Reddit account and API credentials
To install PRAW, use pip:
pip install prawBefore running the script, you need to configure your Reddit API credentials.
-
Go to Reddit's Developer page and create a new developer application to get your client ID and client secret.
-
Replace the placeholders in the script with your credentials:
CLIENT_IDCLIENT_SECRETUSERNAMEPASSWORDUSER_AGENT(can be any descriptive string)
CLIENT_ID = "Enter_your_clientid"
CLIENT_SECRET = "Enter_your_secretkey"
USERNAME = "your_username"
PASSWORD = "your_password"
USER_AGENT = "UnsubBot"-
Clone or download the script:
git clone https://github.com/your-username/unsubbot.git cd unsubbot -
Run the script:
python unsubbot.py
The script will:
- Authenticate using your Reddit credentials.
- Retrieve all the subreddits you're subscribed to.
- Unsubscribe from each subreddit.
-
You will see output like this:
Found 20 subscribed subreddits. Leaving them now... Leaving r/subreddit1 Leaving r/subreddit2 ... All done!
- Authentication errors: Ensure your
CLIENT_ID,CLIENT_SECRET,USERNAME,PASSWORD, andUSER_AGENTare correct. - API limits: Reddit's API has rate limits. If you unfollow too many subreddits too quickly, you might encounter temporary bans or limitations.
This project is licensed under the MIT License - see the LICENSE file for details.