A twitter bot that tweets a game of thrones quote every 24 hours. The quotes are stored in the data.json
file as a JSON object.
N.B: You will need to have a twitter developers account. So make sure you already have one or go to Twitter Developers to create a developer account. After doing that, you can proceed to doing the steps listed below:
- Clone project repository
- Navigate into project repository i.e
cd tweet-quote-bot
- Set up a virtual environment for the project:
$ python3 -m venv
or$ py -3 -m venv
- Create a
credentials.py
file - Add the following information to it:
ACCESS_TOKEN=YOUR-ACCESS-TOKEN
ACCESS_TOKEN_SECRET=YOUR-ACCESS-TOKEN-SECRET
API_KEY=YOUR-API-KEY
API_SECRET_KEY=YOUR-API-SECRET-KEY
- Install the requirements:
$ pip install -r requirements.txt
- In
bot.py
, import yourcredentials.py
file i.eimport credentials
, then change lines 9-12, thus:
consumer_key = credentials.API_KEY
consumer_secret_key = credentials.API_SECRET_KEY
access_token = credentials.ACCESS_TOKEN
access_token_secret = credentials.ACCESS_TOKEN_SECRET
- Save changes and run
bot.py
. - To stop script at any point in time press
ctrl + c
.
You can follow the tutorial found here UPDATE: I wrote about it here also.
- I am a Khaleesi of the Dothraki. I am the wife of the great Kahl and I carry his son inside me. The next time you raise a hand to me will be the last time you have hands. ~ Daenerys Targaryen
- "Oh, monster? Perhaps you should speak to me more softly then. Monsters are dangerous and just now Kings are dying like flies." ~ Tyrion