First CLI Project

Posted by on January 21, 2021

This past week (and a few days) have been very long, stressful and yet exciting for me. I got to build my first “app” for the CLI Data Gem project and boy was it challenging. I actually had no idea what to even expect from this project and was quite nervous. As I started my final lab before the project “Student Scraper”, I decided to skip ahead one lesson to read what the project is about and start brainstorming some ideas.

After knowing what the project required, I easily had a few ideas in mind on what kind of app I was going to build. From the past few modules I knew scraping was very difficult for me, so I knew I needed to find a good website to scrape or try to learn how to use an API for this project.

My number one idea I had for the project had to do with making a cocktail (because who doesn’t love a good cocktail after a long day of coding? haha). I wanted to set it up so you greet the user, Show them a list of cocktails they could choose from, they pick a cocktail and then you display the ingredients and recipe on how to make it. I even found a cocktail website that (I thought) was good for scraping and and API that I could use as well to help me get started!

So after finishing the final lab before the project, I went ahead to watch a video walk through of the project. Then I started readinng through the instructions and begining the coding process. I set up a video walk through on one side of my screen and my github/ VS Code on the other side so that I can follow along while begining to build.

Originally, since I knew scraping wasn’t my forte, I planned to use the API site that I found to get the cocktails. After trying to follow along with a video on the project with API’s I got very lost and figured that I should try the scraping first considering it was actually taught in the curriculum already.

Scraping the list of cocktails on the first webpage and putsing them out to the user with indexes was definitely a tough one. It took me a few hours and a lot of research but once it was done it was like a weight was lifted off my shoulders. Next just following along with the video and writing most of my code was the exciting part for me. I definitely dont think I would have been able to do most of this project without the video walk throughs, but following along with them taught me a lot! Sometimes I wish I would have done part-time or full-time just to get the expierence of working with an instructor and being able to ask questions freely, but that just wasn’t an option for me with work and money so I will get through it on my own.

The next HUGE obstacle for me was scraping each individual drinks ingredients and recipes. I realized since you had to click on the drink, go to another webpage, and then scrape that page for the ingredients that it was going to take me some time. I needed to scrape the URL’s of drinks on the original webpage, then use that to scrape into the second level.

The first day or two I tried this on my own I almost gave up. I thought maybe I picked a bad website to scrape or it just wasn’t meant for me and I had to switch to API. Then I started asking some friends and group chats and got closer and closer. One girl in particular I was chatting with back and forth with for a while and she ended up giving up basically saying that she thought I needed to find a different website. But then after digging a little more with her advice, i figured it out and boy was it the best feeling in the world. I ended up not scraping the recipe and just doing the ingredients for the drinks since this project was pretty basic and I was already working on it for over a week.

A big lesson I learned throughout this process was to always try to push yourself a little more before giving up. I was so close to just re-starting and swtiching to use API’s and thank god I didnt or else I would still have been working on re-doing all that code still right now. Also don’t be afraid to use all the resources and help you can get. Never feel bad for asking your peers for advice, most likely they will teach you something you didnt already know!