/RedditMemeBot

This Reddit bot posts memes for you automatically on your Reddit account.

Primary LanguagePythonMIT LicenseMIT

RedditMemeBot

GitHub Repo stars Translate

Table of Contents

Description

Automate your daily dose of humor with the RedditMemeBot! This Python-based bot is designed to effortlessly curate and post memes to your favorite subreddits, adding a touch of joy to your online experience. Forget the manual search for amusing content – let RedditMemeBot handle it for you.

Getting Started

Dependencies

The list of dependencies for this Reddit bot is the following:

praw:

Description: Python Reddit API Wrapper Version: 7.7.1

icrawler:

Description: A flexible and powerful image crawler library Version: 0.6.7

Installing

First, navigate to the directory you want to have your project.

cd path/to/your/directory

Next, clone the repository.

git clone https://github.com/BoyManWamen/RedditMemeBot.git

Move into the project directory.

cd RedditMemeBot

Make sure you have installed all of the dependencies such as GoogleImageCrawler and praw.

pip install icrawler praw

Next, make sure that you change CLIENT_ID, SECRET, PASSWORD, and USERNAME in the following lines of code:

reddit = praw.Reddit(
    client_id=os.getenv("CLIENT_ID"),
    client_secret=os.getenv("SECRET"),
    password=os.getenv("PASSWORD"),
    user_agent="Reddit Image Poster by u/",
    username=os.getenv("USERNAME"),
)

In order to get your client id and client secret, you must work with Reddit OAuth. The documentation for how is linked below.

Praw Documentation

Make sure to change me_irl in the following lines of code to choose which subreddit you want to upload your memes to.

reddit.subreddit("me_irl").submit_image("me_irl", f"./dataset/{randomword} meme/{file}")

Executing Program

In order to run the program, you can use the following command in the terminal.

python src\main.py

Authors

Huy Hoang

Version History

  • 1.0.0
    • Initial Release

License

This project is licensed under the MIT License