Inspiration

As most humans watch YouTube, we wondered if intellectuals such as ourselves were capable of telling which videos have higher views based on the clout of the channel name and how much clickbait energy exerted from their thumbnail. This led to the creation of YouTube: Higher or Lower

What it does

This is a simple game that pulls information from top YouTube videos that are obtained by any random search. Using this data, the hack will prompt the user to click between two videos on which one has a higher view count, with the data presented being its title, thumbnail, and channel name. Upon selecting the correct answer, the website would update to present a new video to compare to, stacking points based on how many in-a-row you correctly pick. Once you mess up, it's game over, and you will have to restart starting from zero points.

How we built it

Data is scraped from YouTube's search, using a bot written in Python using the selenium library. Search terms are sent from the command line, and then the database is populated from the search results, including its Title, Genre, View count, Channel name, and thumbnail.

The database storing the information is hosted on firebase, using their Realtime Database.

This information is grabbed and fed through python to our frontend, which was written in HTML and CSS. This information is handled with JavaScript in the frontend, which handles the inputs and rendering the information given by the backend.

The frontend is hosted using Flask for python, which handles redirects and inputs along with API endpoints.

Challenges we ran into

Figuring out how to connect our backend to our frontend, and how to change the elements of our html from JavaScript.

Accomplishments that we're proud of

Being able to obtain all raw data from YouTube and create a website for the first time for all of us, combining elements from a database that updates in real-time.

What we learned

We learned how to properly scrape data from websites. We also learned how to connect and host a frontend from python on the back with flask. Dealing with inputs and making a responsive game was a challenge, since none of us had any experience with any kind of web dev before.

What's next for Youtube High Low

Automating populating the database with search queries, having animations using CSS, allowing for customization on what sorts of topics to play with.

Share this project:

Updates