Coder Social home page Coder Social logo

hq_bot's Introduction

HQ_Bot ๐Ÿค–

License: MIT

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
  • pyscreenshot - Take screenshot of the game
  • wxPython - GUI interface

To easily install these

  1. Install python 3.6
  2. Install above packages
    • $ pip3 install -r requirements.txt
  3. For tesseract
    • $ brew install tesseract
  4. For opencv
    • $ brew install opencv

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/sushant10/HQ_Bot
$ cd HQ_Bot
$ pip3 install -r requirements.txt
$ python3 answer_bot.py
Press s to screenshot live game, sampq to run against sample questions or q to quit:
s
...Question...

Screenshots

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)

hq_bot's People

Contributors

arudiuk avatar sushant10 avatar tanujyadav97 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.