Ok… So… Trump’s administration has made it known that they do not believe climate science. As a result, I have taken it upon myself to collect a MONSTER list of links to climate research to be used in a Twitter Bot.
Step 0: Create a .txt file that is nothing more than a list of links to climate change data!
Step 1: Set up one of my RaspberryPi’s to work headlessly.
Step 2: PYTHON!
Step 3: Setup Twitter Bot page.
Step 4: RELEASE THE BOT!
Step 5: …hmmm… so I’ve got the code to work. But… it seems after about 4 posts(2 hrs), the bot stops working…. This is annoying. Scratch head and return.
…Best guess, the server is timing out. Worst guess… Twitter bots work on pizza and beer and mine has neither.
*Will return to make this into a tutorial.*
I just discovered how to fix the “timing out” problem. I had a “derp.” need to use:
It will let me run the code at set times. So if I rewrite the code to select a line at random… I should be in the clear. But it also means I need to figure out how to deal with the exceptions/errors it sends back when a tweet is repeated.
Bot appears to be working:
The Twitter Bot is most definitely working!
You can find the tutorial and examples that I am putting together here: