twitterImgBot: almost useful now
My twitter image bot has evolved a lot through the last couple of months. I’ve been mostly working on it through one-day coding sessions when I felt like it, but it has gone from a ultra simple script to a somewhat more robust solution for anyone who wishes to tweet a lot of images to an account.
Just a couple days ago I uploaded a new version to github. This will probably the last. I honestly don’t think there are more features to add at this point, or at least nothing I need for my pet project @gentelindaOK. Maybe (if I someday feel like it) will add the option to control the bot via direct messages. The problem with this is that twitter API is giving me an ‘access forbidden’ error no matter what I try, so for now that’s a no-no.
This is the feature list:
- Separate config file. You don’t have to touch a line of code.
- Commands: set up a ‘master account’ and ‘ban command’ and ban images so the bot deletes them from twitter and never posts them again.
- Request: any user can request an image with a request_command. they can also request an image for another user as a gift.
- Custom answers: a list of possible text answers to requests can be given.
- No repeat: bot will not repeat images! you can set the tolerance in the allow_repeat_after setting in the config file.
- Execution chance makes it possible to run the script every minute to check for requests and commands while not posting. This way the script doesn’t have to run on the background. Make it higher if you want your bot to tweet more often!
- Ideal for setting up a bot at home: you don’t need a server; just python and a bunch of images in a folder.
Now, get the code and get your bot up and running.