Aminata Gadio Final Project — Web scraping
Cheers to an amazing Semester!
I feel accomplished. Accomplished not only because the semester has finally come to an end, but because I learned how to code — something I’ve never thought I would proudly say I’ve done. When I first registered for the class in December as a Freshman, I was nervous. I thought about dropping the class even before the first day. I thought the class would be filled with students who have taken a computer science class in the past or even advanced in the subject. From the beginning, I thought taking the class was a mistake — but that did not stop me from believing in myself and taking a chance in taking my first ever college computer science class.
When I first entered the class, there was about 20 students. It was obvious that not many people had taken a computer science class in the past — I was not alone. Jacob, who was our professor treated each student equally as if we were all in the same level. That made me feel more confident in myself throughout the semester. Thankfully, I became friends with Gia, who was also struggling like I was in the beginning of the semester. We stayed together after class to catch up on work we missed in class, sat in the front of the classroom to make sure we both we understanding classwork, and most of all, we never gave up.
From my first and second blog post, I learned so many things about collecting data and using Anacoda to build your own website. For my first blog post, I used data to determine how much water is consumed throughout New York City. Through this, I was able to explore the topic of scrapping data using my own topic of interest. For my second blog post, I used Flask to begin creating my own website. However, because I had many technical difficulties on my HP laptop, I wasn't able to catch up with the class to finish my website. However, my second blog post of creating my own website is an ongoing website that I will continue after the semester.
For my final project, I decided to do something new. Something that I’ve learned to do on my own and pleased with the final outcome — Scrapping song lyrics. Because I learned to scrape song lyrics on my own, I had to dedicate time to learning how to do it step by step. My professor, Jacob, had given me loads of videos and websites to learn from to learn how to scrape song lyrics. From continuous trips to the learning center and asking questions, I was able to begin.
Because I am from Senegal, I decided to scrape song lyrics from a famous Senegalese singer, Akon.
Step One:
From the code above, I was able to scrape Akon’s songs from the site, lyric.com which gives me a list of his songs. After inspecting the page, the command : {‘class’: ‘artists-album-label’} I was able to get a direct list of all of the songs published for Akon on the page.
From here, I picked out all of the songs in the list from the titles of the songs to the links where all the songs came from.
From class notes, I was able to copy and paste the same code onto my final. In image below, I wanted to find whether or not the positive and negative words that I have identified were in the song. The words ranged from ‘yummy’ ‘tasty’ and many more in between.
The part that challenged me the most are the input and output commands. This function below is designed to give an output whenever and input is inserted. For example, the first command says, ‘may I help you’ after you put in the name of the artist, it is supposed to give you another command which asks for the name of the song. This will eventually give you a lost of Akons song. Below is an example of what you should expect.
Link to full page:
Overall, from my experiences in my first computer science class, I learned so many things that not only helped me in this class, but will help me throughout my educational experience here at The New School.
I would like to personally thank my professor for not giving up on me. From the times he’s lend me his computer, to answering my questions on slack. I appreciate it.
From the beginning of the semester, I did not believe in myself. But today, as I submit my last assignment of the semester, I will not only take chances and be confident in myself for today, but for tomorrow, and many generations to come.