Awesome-twitter-bot
Awesome-twitter-bot copied to clipboard
This is a django based twitter bot
Awesome Twitter Bot
This is a tweepy/django/heroku/heroku-postgres/dropbox based twitter bot, it can follow, search, like, and ignore people from twitter, contains an advance admin to personalize it.
You can follow this bot here: https://twitter.com/PequeninWarrior
Features
- Follow/Unfollow, Like, Retweet and Search
- Customizable topics, people, etc from django admin
- Heroku free tier full support
- Save the data in .csv format in dropbox
- Automated actions
TODO
- Machine learning for tweet classification
- Responses
- Less intrusive algorithm
How it works
This is a heroku based project
Setup Django
- Configure your heroku project, save the name, you will need the Heroku Postgres and Heroku Scheduler add-ons
- Configure the environment variables from the heroku settings
THIS FROM TWITTER https://developer.twitter.com/en
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
ACCESS_TOKEN = ""
ACCESS_TOKEN_SECRET = ""
THIS FROM DROPBOX (Optional) https://www.dropbox.com/lp/developers
ACCESS_TOKEN_DROPBOX=""
DEBUG = 1
SECRET_KEY a random string
- Build the docker development and run it to make sure everything is ok
docker build -t web:latest .
docker run -d --name <herokuname> -e "PORT=8765" -e "DEBUG=0" -p 8007:8765 web:latest
- You can deactivate like this
docker stop <herokuname>
docker rm <herokuname>
- You can upload your project with this commands
docker run -d --name <herokuname> -e "PORT=8765" -e "DEBUG=0" -p 8007:8765 web:latest
heroku container:login
heroku container:push web -a <herokuname>
heroku container:release web -a <herokuname>
- Do not forget to migrate
heroku run python manage.py migrate -a <herokuname>
- Create your user with
heroku run python manage.py createsuperuser -a <herokuname>
- Enter to your proyect from this url
http://<herokuname>.herokuapp.com/peque-admin
-
Log in and configure your interest topics and interest users
-
You can try this commands
heroku run python manage.py runscript update_following -a <herokuname>
heroku run python manage.py runscript search_follow_tweets -a <herokuname>
heroku run python manage.py runscript search_tweets -a <herokuname>
heroku run python manage.py runscript clear_users -a <herokuname>
heroku run python manage.py runscript clear_tweets -a <herokuname>
heroku run python manage.py runscript auto_follow -a <herokuname>
-
Configure your scheduler with those commands
-
You are ready
More interesting projects
I have a lot of fun projects, check this:
Machine learning
- https://github.com/HectorPulido/Evolutionary-Neural-Networks-on-unity-for-bots
- https://github.com/HectorPulido/Imitation-learning-in-unity
- https://github.com/HectorPulido/Chatbot-seq2seq-C-
Games
- https://github.com/HectorPulido/Unity-MMO-Framework
- https://github.com/HectorPulido/Contra-Like-game-made-with-unity
- https://github.com/HectorPulido/Pacman-Online-made-with-unity
Random
- https://github.com/HectorPulido/Arithmetic-Parser-made-easy
- https://github.com/HectorPulido/Simple-php-blog
- https://github.com/HectorPulido/Decentralized-Twitter-with-blockchain-as-base
Licence
This proyect uses Django, tweepy, dropbox libraries, also was made to work with heroku but everything else was totally handcrafted by me, so the licence is MIT, use it as you want.