This bot automatically posts iconic quotes from Game of Thrones on Twitter at regular intervals.
- The bot is built using Python and the
tweepylibrary to interact with the Twitter API. - It selects a random quote from a
quotes.jsonfile containing Game of Thrones quotes. - The bot is scheduled to run using PythonAnywhere's scheduled tasks.
- The quotes file is sourced from the Game of Thrones XYZ API (credit to them for the quotes data).
- Clone the repository:
git clone https://github.com/harxhe/twitter-bot-python.git cd twitter-bot-python - Install dependencies:
pip install tweepy
- Set up Twitter API keys:
- Get API keys from the Twitter Developer Portal.
- Create a
.envfile and store your keys:CONSUMER_KEY=your_consumer_key CONSUMER_SECRET=your_consumer_secret ACCESS_TOKEN=your_access_token ACCESS_SECRET=your_access_secret
- Run the bot manually:
python main.py
- Deploy on PythonAnywhere:
- Schedule the script to run at a fixed interval using the built-in task scheduler.
Make sure to check it out @dailyquotes339