Tag Archives: weird_youtube

That weird part of YouTube

One of the most fruitful memes on the internet is “That wierd part of YouTube”. I saw an opportunity to createa a service to find the weirdest videos on YouTube, and I made this webpage.

Links

Live page
GitHub repository

Overview

This page uses the YouTube Javascript API to load pairs of YouTube videos. The user then votes on which one they think is “weirder”, and two new videos are loaded for comparison. The backend is handled using PHP with a MySQL database to store and retrieve the video ids. The user can submit their own videos with client side validation of the URI and server side sanitisation to prevent MySQL injection attacks. The statistics associated with each video are also displayed, showing how many times each “won” or “lost” a comparison.

This project was never actually released outside my webspace, despite my original intentions. This is because YouTube is very clear about its branding policies- a third party cannot use the word “YouTube” without explicit permission, and the meme requires the name “YouTube” to be used. As a result this was only ever shown to my friends and never received much traffic. I may revisit this later and release to the general public with a different name.

Challenges

Challenge: As usual, this uses the YouTube Javascript API and all the difficulties that come with that.
Solution: The YouTube Javascript API is second nature now. This wasn’t difficult at all! (Resolved)
Challenge: The user should be able to recommend videos.
Solution: The interface to add suggestions had to be simple to use, so I made the form as clean as possible. The input had to sanitised as well. The URI is matched to a regular expression client side before submission, and sanitised server side to prevent injection. The server side sanitising is very easy given that it must consist of exactly 11 characters in the set [A-Za-z0-9_\-]. (Resolved)
Challenge: This page needed a catchy motif.
Solution: I wanted an image of YouTube videos falling from the sky, as if the videos has been rejected and thrown onto a pile. I had to emulate the YouTube logo using vector graphics with the canvas, then randomly generate an collection of them that wrapped around in the horizontal direction for the wallpaper. It was fun to make, and I may make a wallpaper generator based on this concept. (Resolved)

Screenshots

Some YouTube weirdness
Some YouTube weirdness
The automatically generated wallpaper
The automatically generated wallpaper