A repo for python twitter bots - let's automate things
First you will need to create a twitter developer account to be able to access the Twitter API: https://developer.twitter.com/en/apply-for-access
Next you will need to set environment variables, in linux:
export CONSUMER_KEY="your_consumer_key"
export CONSUMER_SECRET="your_consumer_secret"
export ACCESS_TOKEN="your_access_token"
export ACCESS_TOKEN_SECRET="your_access_token_secret"
Now you should be able to run any of the above using for example:
python3 followBot.py
A Twitter bot which draws and tweets any user's profile picture after they
have replied with a tweet containing the string "draw me" in it. Makes use of
drawImage.py
in the resources
directory
A bot that will create and tweet a hand drawn image of your own profile picture.
A bot to tweet the day of the week using the time
module, a given quote and
the gif thankYou.gif
located in the resources
directory.
A bot to favourite all tweets, retweet half and follow some tweets/users based on a given filter ("#100DaysOfCode" by default).
A twitter bot which follows everyone who follows me who I don't currently follow.
A twitter bot to favourite and retweet all tweets based on a given filter.
A twitter bot to auto replys to mentions like an answer machine.
Contains config to connect to the Twitter API, gets values from Environment Variables.
- Tweepy - An easy-to-use Python library for accessing the Twitter API.
Thanks to the #100DaysOfCode Twitter community for encouraging me to code for fun!!
This was my starting point and will help anyone get started with Python Twitter bots: https://realpython.com/twitter-bot-python-tweepy/