Fun Food Finder
This project was a final project for NETS 1500, where I worked in a group of three to create a web-scraping app for locating recipes based on user entered filters. It uses Java’s Jsoup library to webscrape HTML and locate specific recipes.
Personal contributions:
- Responsible for writing program to establish website connection and access & parse relevant data,
- Designed and implemented UI & UX for displaying recipes on Java GUI app based on user filters
Java
Web scraping
Jsoup
Overview
Users can:
- Enter their individual allergies
- Check off common dietary restrictions
- Filter recipes based on meal types (i.e. lunch or dinner)
Once recipes are located on the web:
- Recipes can be sorted based on star ratings or cook time
- Check off common dietary restrictions
- Recipe instructions are scraped and displayed in the app itself.
Lastly, as a fun, extra feature, we implemented a random meal plan option. A random breakfast, lunch, dinner, snack, and dessert recipe is displayed for the user as their meal plan for the day.
How it works
Fun Food Finder is a web scraping application that, at a high level, connects to a recipe webpage, parses the page for relevant information, and then uses that data to filter out which recipes it displays to the user.
First, the user inputs ‘filter’ information, such as allergies, dietary restrictions, and ingredients they have on hand. Once they press ‘search,’ the program will connect to a recipe webpage, in this case, the AllRecipes home page. The web scraping functionality is accomplished with jsoup, which allows the program to fetch URLs to connect to web pages, and then extract information from these pages. Next, the program will use the filters inputted by the user to determine which branching web pages it needs to follow from the AllRecipes home page.
Once all relevant recipes are found, the app will sort and subsequently display the recipes based on user preference (star rating, cook time, or calories). If the user decides to edit their filters, all they need to do is press search again!
Below is a screenshot of our Java GUI app!