TrumpyBot- Building a Twitter Bot

Well, I had a solid half-hour before practice and decided to build a twitterbot.

(You can follow him at @trumpybot)

I had him set up on a crontab but then decided to make my own little menu system so I could cycle through the poorer generated tweets.

(Following this tutorial closely: http://jitp.commons.gc.cuny.edu/make-a-twitter-bot-in-python-iterative-code-examples/)

Essentially, the code takes 20 or so trump-isms, goes through some adjective and noun repositories on GitHub, and then creates a madlib with some random generation, spitting out interesting results.

From there, tweepy handles the rest. Doing this in Python made things really easy!

Screen Shot 2016-10-15 at 5.35.40 PM.png

my tiny Python menu system, and the result:

Screen Shot 2016-10-15 at 5.36.09 PM.png

Advertisements