We live in an era of media explosion. our minds are bombarded with information from countless media channels on a daily basis. We can’t really control it, it’s everywhere, with data that’s accessibility is increasing everyday, it seems that every passing day there is more and more bad news reported everywhere.
It isn’t that these are the only things that happen. Perhaps the readers, have trained journalists to focus on these things and we are fed what we actually need in order to progress and survive. Bad news sales.
But what if there was a channel that would surface only good news? would we watch it?
I chose to focus this in my bot project.
Using news API, Im querying a list of news headlines from different news channels throughout the world and from different topics such as business, entertainment, health, science, technology and more.
After fetching the answers back from the API and pushing them to an array, using a sentiment analysis library sentiment.js , I’m checking the score of the headlines and filtering only positive results, picking the highest score from a batch of 20 headlines.
Posting to mastodon:
Once every 5 minutes I’m pushing my results to mastodon via the mastodon API, creating a feed of filtered good news results – the whats good bot 👍.