Skip to content

harxhe/twitter-bot-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Bot Using Python

This bot automatically posts iconic quotes from Game of Thrones on Twitter at regular intervals.

How It Works

  • The bot is built using Python and the tweepy library to interact with the Twitter API.
  • It selects a random quote from a quotes.json file 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).

Installation and Setup

  1. Clone the repository:
    git clone https://github.com/harxhe/twitter-bot-python.git
    cd twitter-bot-python
  2. Install dependencies:
    pip install tweepy
  3. Set up Twitter API keys:
    • Get API keys from the Twitter Developer Portal.
    • Create a .env file and store your keys:
      CONSUMER_KEY=your_consumer_key
      CONSUMER_SECRET=your_consumer_secret
      ACCESS_TOKEN=your_access_token
      ACCESS_SECRET=your_access_secret
      
  4. Run the bot manually:
    python main.py
  5. 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

About

this is a simple twitter bot that posts random quotes from out favourite tv series game of thrones

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages