twitter-bot
This is a simple twitter bot which keeps saving tweets related to a keyword and retweet them after analyzing...
MySQL Setup :
mysql -u "root" -p
- type your password leave blank if using for first time...
- create DATABASE twitter;
- use twitter;
- CREATE TABLE tweets (tid VARCHAR(30), tweet VARCHAR(300));
- quit
Other settings in settings.py
- change your Database usernam, password in that file.
- go to https://apps.twitter.com/ and add a new app.
- now get credential for your app.
- Put that in settings.py
Python module installation
pip install tweepy
pip install mysql-python
Running your Setup
- Run Listening.py
python Listening.py
It will save tweets which contains your keywords in it in your database
You can do analysys and see which tweets needs to be retweeted and which not....
- Run Retweeting.py
python Retweeting.py
It will retweet your tweets and delete them after retweeting