/InspirationBot

A Twitter Bot that posts inspirational quotes.

Primary LanguagePython

InspirationBot

A Twitter Bot that posts inspirational quotes. Currently inactive: @inspirationqtz.

quoteGrabberBot.py:
  • Uses BeautifulSoup to scrape HTML from goodreads.com
  • Parse out 30 quotes per page, for 100 pages (Starting URL)
  • Filters out quotations that are not Twitter friendly (> 140 characters)
  • Appends quotations to quotes.txt
inspirationBot.py:
  • Establishes connection to Twitter API via Tweepy
  • Reads in quotes.txt generated by quoteGrabberBot.py
  • Generates a tweet (in the format "Quote + Hashtag") and sends tweet to Twitter
  • Continues to tweet every 30 minutes until no more tweets available or Keyboard Interrupt
  • On Keyboard Interrupt, unused tweets rewritten to quotes.txt

How to Run

  1. Replace CONSUMER_KEY, CONSUMER_SECRET, ACCESS_KEY, ACCESS_SECRET in inspirationBot.py with your appropriate Twitter API credentials.
  2. Run: $ python3 quoteGrabberBot.py
  3. Run: $ python3 inspirationBot.py