Inspiration

We were inspired to build this project because we were curious about the Python language and how it could be utilized to build projects for the web. This project was simple enough to introduce us to these concepts and teach us about Python and website APIs.

What it does

This project takes Reddit posts that get posted in real time and responds to them with a fitting meme. The user can select what meme the bot focuses on, thereby using keywords to decide if the post fits the chosen meme.

How we built it

We built this project by downloading the praw wrapper for the Python Reddit API and utilizing it to stream comments from Reddit and access relevant data fields in those comments to determine if the user-selected meme was compatible. We used the Python programming language to implement this functionality along with receiving and processing user input and searching for keywords in the body of text for the comments.

Challenges we ran into

The first challenge we ran into was having very little experience in regards to knowing the Python programming language and using APIs to build scripts to read and manipulate websites. We then ran into issue of being able to properly unpack the praw wrapper into our Linux environments. Once we finished this and wrote our initial code for our bot, we then had to fix it from replying to itself after making an initial comment. After that we had to add complexity to the bot by adding the option to the user of choosing from different memes and streamlining UI.

Accomplishments that we're proud of

In doing this project, we accomplished the creation of an autonomous bot that could freely analyze and respond to new comments on Reddit. We did this despite our lack of experience in Python and the utilization of web APIs.

What we learned

After finishing this project, this team feels that we gained a greater understanding of the programming language Python and using web APIs to build projects on the web.

What's next for Reddit Bot

In the future, should we chose to revisit the Reddit Bot, we could improve its capability to analyze Reddit comments beyond searching for keywords, using more advanced analysis techniques to look at the most appropriate meme for a comment.

Built With

Share this project:

Updates