Finding real recipes on Instagram
- canedoyoumami
- Jan 12, 2021
- 2 min read
Youmami will be written in Python. I found two very promising packages that interact with the Instagram API to pull and push data. Instaloader seems to be focused on pulling data. It has 2.4k stars on Github. Instapy, on the other hand, seems to be focused on pushing data to Instagram. It has 12.1k stars on Github. Both projects are active and there is a good community around them.
Youmami will find recipes associated to a hashtag (e.g., #barbecue) and recommend it to its users on a weekly basis. One approach is simply to recommend what the barbecue community cooked the most this week (e.g., ribeye). This could be established by analyzing #barbecue related posts and finding the dish that was trending this week. Unfortunately, most instagram posts only have a very short caption (e.g., dish name) and a set of hashtags. Therefore, it is not straightforward to find recipes.
At the very minimum, a recipe should contain a list of ingredients. For now, I am focusing on pulling content with Instaloader and manually analyzing the posts. So far, I have found two kinds of patterns. The first is an Instagram post with a high-quality photo and a short description asking the visitors to visit a website to see the recipe. The authors are probably trying to pull traffic to their sites. The second is a post with an amateur photograph but with a description listing the ingredients and often providing a simple process. For #costarting, I will be focusing on recommending recipes from the second category.
The hashtags are very helpful because they are filters. This will allow Youmami to recommend different kinds of recipes to users with different interests. For example: #barbecue, #keto, #vegan, #pomegranate.
I am envisioning a simple mechanism for users to receive personalized recommendations:
Post a comment in any of Youmami's IG posts with a hastag. For example "@youmami_bot #vegan"
Parse these notifications and build a database of IG users and hashtags.
Find the weekly recipes for all the hastags in the database.
Publish a comment in the original post that contains the weely recipes. These comments will tag all the IG users associated to that hashtag. This will promote the recipe creators IG channels and bring them more exposure.
Here is a burrata truffle recipe by @mikefeedskhoeats that I found while parsing this week's data. Give it a try!
"Burrata and truffle in the same dish??? Wow! These were 2 massive pieces of burrata topped with truffle pate, honey, chives, and black pepper, and to be honest if I didn’t have to share I probably could have eaten all. These could be a great appetizer served with crostini, the perfect side dish, or just a snack, because why not?Kathleens rating: 10/10️️ So easy to put together - even I could do it!!Ingredients:
1. Burrata
2. Truffle Pate
3. Honey
4. Chives
5. Black pepper
All these ingredients were bought from @wholefoods!Recipe:
Put all of those ingredients together and enjoy!"
Comments