MemeBot

Those who know me well know of my affinity for memes. I had (have?) a habit of scouring meme accounts for hours on Instagram. It was becoming a major problem; I was working on my thesis and I NEEDED to focus.

Problem

I spend 2-3 hours a day looking at memes from trashcanpaul, shitheadsteve, cabbagecatmemes to name a few - and it still wasn’t enough. I needed to get de-addicted.

Idea

Trying (and failing) to keep my phone away made me realize de-addiction is not possible. Impulse control has never been one of my strong suits, haha. So I decided to make a chat bot, which would give me a daily dose of memes from my favourite accounts - this would at least prevent mindless scrolling on Instagram.

Solution

I built a chatbot on Telegram to feed me memes from my favourite accounts on Instagram. I deployed the bot on Heroku, my favourite free cloud platform.

Tech Stack

I decided to use Python for this project; there are many Python libraries available for Telegram. I chose the one that was well documented with the most stars - and within minutes I had a REST API set up for basic bot messages.

Since all the meme accounts I followed were public, I did not have to bother with authentication - I just needed to figure out the Instagram API structure to scrape the 5 most recent memes and display them when I typed the command /meme.

meme

Future Improvements

  • Instagram deprecated its API endpoints, changing from a RESTful structure to GraphQL in 2018.

  • Since Dec 2018, they changed the authentication method - now you have to register your app’s use case and perform OAuth - all this to retrieve media I was able to get just by REST API.

  • I need to register my app as a business use case in order to be able to scrape the same things I was scraping before.

  • Stop looking at memes.

PROJECTS
personal python