Skip to content

bharathalleni/HQBot

 
 

Repository files navigation

HQBot Python2.7 PRs Welcome Twitter

HQTrivia

A bot for the popular mobile game HQ Trivia

Usage

Usage

Example

./bot.py -v -i test_question2.png

Test Question

Test Question

Busking (Verb) - the act of performing in public places for gratuities. In many countries the rewards are generally in the form of money.

Installation

  1. Install requirements
pip install -r requirements.txt
  1. Enable API's in Google Cloud. Go to Google Cloud. Enable Google Cloud Natural Language API, Google Cloud Custom Search API and Google Cloud Vision API.

  2. Go to Google Cloud Credentials Page and download the JSON file.

  3. Set GOOGLE_APPLICATION_CREDENTIALS in the config file to the path of where you saved the JSON file.

  4. Create a new (Custom Search Engine)[https://cse.google.com/cse/all]. Enter www.anyurl.com in the sites to search input. Click Create. Then click Modify your search engine, then go down to Sites to search and under advanced change from Search only included sites to Search the entire web but emphasize included sites.

  5. Set customsearch_id in the config file to your search engine ID found under the detials section of CSE.

  6. Set developerKey in the config file to your Developer API Key found in the Credentials Page

  7. Try it:

./bot.py -v -i test_question2.png

Dependencies

HQBot depends on the following Python 2.7 modules:

google-cloud-vision
google-cloud-language
google-api-python-client

Note

This is using a Google Custom Search to try and predict the best possible answer. Answers may not be 100% correct but know my HQBot tried its best.

LICENSE

MIT License

About

A bot for the popular mobile game HQ Trivia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%