Shitpost Status Update: Better Error Handling, Improved Backend, Improved Upload Validation.

in #programming13 days ago
Authored by @cadawg

image.png

Shitpost Status

Hello Everyone,

Long time since I've updated this website, in fact it was last year, but I have finally decided that the old PHP scripts have served their time after using the site the other day, as the validation, while acceptable didn't actually validate youtube videos. This lead to people uploading 10+ min videos on a site designed for short meme videos. I felt this ruined the flow so there are now some new measures in place.

It has now been migrated to an Express.js backend, as Node has a lot of libraries for handling YouTube, I felt this would make it easier for me to validate the information and would be a lot nicer than 4 PHP scripts dumped in a folder somewhere, on a different domain alltogether!

Upload Validation

To prevent people uploading things that are unsuitable to the website, there is now a 2 minuite cap on the length of any video. I feel this limit is a reasonable compromise between uploading genuine memes and funny videos and just uploading whatever is on a YouTube channel and should stop large videos being uploaded to the website. It also now checks that it exists too, as it would take any link and treat is as perfect before. As well as this it checks that it can be embeded to help prevent some errors in the first place.

Improved Error Handling

If you've used the site before, you may have noticed that sometimes between videos a bunch of videos error due to being private, deleted or unavailable for other reasons. I felt this was annoying as it'd often ruin the flow when browsing through the videos. Now, when a video errors in your browser, it sends a message to the server to tell it that it thinks it is unplayable, my website then goes and asks youtube if there is a reason for it being unplayable, and if there is, it will remove the video from the website and mark it as errored for me to see. The server checks this so it can't be abused to delete videos that you don't like.

Analytics

Analytics have always been installed on this site, and you're more than welcome to view them as they're available publicly via Simple Analytics. As always privacy is of upmost importance, and you can read their policies to see that this is true. We also utilise cookieless YouTube in order to help keep your usage of the site private.

image.png

A nice little crowd are using the site, thanks for stopping by, it's much appreciated!

Ideas are free

As always, the code is Open Source, feel free to contribute on GitHub!

Feedback

Feel free to give me feedback below this post or Join the Discord

Future Ideas

As well as this, I would like to expand the functionality in the near future. I would quite like to be able to make them searchable as sometimes I want a specific video and don't want to watch the whole lot just to find one. I also think a ranking by votes would be pretty cool to see! What do you think?

I also think actual user accounts would be nice, as opposed to the current system, which is nice for casual viewers, but I feel there should be a proper way to claim and keep your account, and maybe even add your own Avatar and Name. How do you feel about this?

Thanks for stopping by the post and or the website. If you've never been there before, why not have some fun and watch some funny videos over on Shitpost Status

Sort:  

Congratulations @shitpoststatus! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 10 upvotes.
Your next target is to reach 50 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP