A twitter bot made using Python and Twitter API to retweet posts using specific terms related to the conference and be beneficial to thea social media campaign by keeping all tweets about PyCon India in one place and get the event trending. It could be hastags, twitter handles, slang words. Anything.
- Fork and clone this repository,
git clone <Forked repository URL>
- Run the following command in your terminal, be sure to have Python3 already setup in your system.
pip3 install -r requirements.txt --user
- Go to the https://apps.twitter.com/
- Click the
Create App
button - Fill the necessary details for your application that you are creating
- Name of the bot
- Website name
- Description
- Once created, goto
Keys and Tokens
section and generate your access tokens.
-
For the bot to run, the Tweepy API needs to be authorised with Consumer keys, access tokens etc. These values are listed in scripts/config.py and needs to be filled before the execution of main.py script.
-
Add hashtags, specific words, user handles in the searchterms list. Anything you want retweeted.
- Navigate to the scripts directory and run the bot using the following command
python3 main.py
Use the following commands to host this app in heroku
heroku create
git add .
git commit -m "initial commit"
git push heroku master
heroku ps:scale worker=1
heroku logs --tail
Refer to the Contributing.md for the same. The source code is under MIT License.