This is a bot that I created using the Twitter API that gives an interesting historical fact for each day of the year. This weekend project let me work on my Javascript and also gave me more experience with the Google Cloud Platform (GCP).
There are 3 main actions the bot does to complete:
-
The bot will first parse the Wikipedia page for the given day. For instance if it is September 21st, the bot will grab the Wikipedia page for September 21st. Important events that have happened on this day are listed on this page. The bot will then parse the page to raw text.
-
The bot then takes the text., randomly picks an event, and formats it for the tweet. The bot will also add an image if one is available.
-
Once it formats the tweet, the bot will then tweet it using the Twitter API.
I am hosting this bot with GCP and have it run every day. This bot was a really fun project to work on and helped me get deeper into the Google Cloud Platform.
For the time being, I have stopped the bot due to charges from GCP. I can still run the bot manually until I find a more feasible way to run it since it doesn't generate any revenue.