/danbot

A simple twitterbot, more fun tweet generators to come!

Primary LanguagePython

Danbot: A basic Twitterbot

In this latest commit, danbot is now posting NY Times articles 'on this day in history'; topic is currently set to politics, but this can be changed in the text_generators.py get_nyt_tweet() function:


Visit danbot here, he is currently set to tweet once a day from my AWS Lightsail Ubuntu instance using 'Screen!'

  • Download the project folder to your local machine
  • Create a file called credentials.py in the project folder. Include dictionaries for your Twitter account's keys and secrets in the following format:
    keys = { 'CONSUMER_KEY' : 'consumer key goes here', 'ACCESS_KEY' : 'access key goes here' }
    secrets = { 'CONSUMER_SECRET' : 'consumer secret goes here', 'ACCESS_SECRET' : 'access secret goes here' }
    If you are using the New York Times text generator function, you will need to get an API key and include an nytkey variable in your credentials file in the format: nytkey = 'ny times api key goes here'
  • Set the post interval variable ('INTERVAL') in bot.py
  • Run python bot.py from the command line
    TODO
  • Add more interesting text generators!