Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.
/ HQ_Bot Public archive
forked from sushant10/HQ_Bot

📲 Bot to help solve HQ trivia

License

Notifications You must be signed in to change notification settings

abrad1212/HQ_Bot

 
 

Repository files navigation

HQ Bot 🤖

License: MIT Travis AppVeyor

A bot to help answer questions on trivia apps like HQ and CashShow. This bot takes screenshot of the game on the phone and uses googles tesseract OCR to read the questions and options. It automates the process of googling of the answers and gives the most likely answer! It is 70%+ accurate!

Since it is against the policy of HQ-trivia I do not encourage anyone to use this during a live game and this is purely for educational purposes.

Packages Used

Use Python 3.6. In particular the packages/libraries used are...

  • JSON - Data Storage
  • Pillow - Image manipulation
  • Google-Search-API - Google searching
  • wikipediaapi - Wikipedia searches
  • pytesseract - Google's free/open source OCR (requires seperate installtion)
  • beautifulsoup4 - Parse google searches/html
  • lxml - Beautifulsoup parser
  • OpenCV2 - Image maniplulation

To easily install these

  1. Install Python 3.6
  2. Install above packages
    • $ pip3 install -r requirements.txt
  3. Tesseract
    • Mac
      • $ brew install tesseract
    • Windows
  4. For opencv
    • $ brew install opencv
  5. Install main package
    • $ python3 setup.py install

Usage

Make sure all packages above are installed. For android phones use Vysor and for iOS use quicktime player. The code expects the phone to be on the left side of the screen. If you want to change the screenshot co-ordinates change the values inside the ImageGrab in the screen_grab() function. To use the script :

$ git clone https://github.com/abrad1212/HQ_Bot
$ cd HQ_Bot
$ pip3 install -r requirements.txt
$ python3 setup.py install
$ hqbot
Press s to screenshot live game or q to quit:

Contributing

All contributions welcome.

Credits

Special shout out

Jake Mor was the person behind HQuack, the most viral popular bot to help solve HQ questions. His implementation inspired me to try my own. I recommend reading this article to learn more about the whole story.

Useful links

License

The MIT License (MIT)

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.2%
  • PowerShell 27.1%
  • Batchfile 12.7%