A Python-built with Tweepy bot to retweet/favorite specified keywords or keywords from trend in specified area. Handle multiple hashtags and keywords as well.
Python3 - Python version 3.6
Tweepy - Python library to access Twitter API
- Understand Twitter's Rules on Automation to prevent getting banned by Twitter.
- Create a new Twitter App.
- Get consumer_key, consumer_secret, access_token and access_token_secret from the App.
- Replace your key, secret and token in the code.
- Replace the woeid for the location that you want to get the trends from. May get the woeid here.
- Or replace the specific keywords to retweet things you want to.
- The keywords = "machine learning%20OR%20%23computer science" will search for machine learning and #computer science.
- Run tweety.py to start retweeting/favoriting/following!
- May consider hosting your code on a Raspberry Pi to run daily.
- Set schedule on pythonanywhere to make the code runs daily.
- Use sleep() to set time between each retweet so that you will not getting banned by Twitter.