Git Product home page Git Product logo

hqbot's Introduction

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

hqbot's People

Contributors

thehappydinoa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hqbot's Issues

Doesn't work with android phone

[?] Click enter when question is on the screen
Error opening file: /sdcard/HQ/2018-03-18_04-55-38_1.png (No such file or directory)
adb: error: failed to stat remote object '/sdcard/HQ/2018-03-18_04-55-38_1.png': No such file or directory
[-] IOError: [Errno 2] No such file or directory: '2018-03-18_04-55-38_1.png'

ADB works and can see device fine.
Google Pixel 2 XL with Android 8.1 March update

Syntax errors

C:\Users\Safwaan\Downloads\HQBot-master\HQBot-master>python bot.py
File "bot.py", line 120
except ValueError, KeyError:
^
SyntaxError: invalid syntax

getting this error whenver I try running the bot.

I've got a problem

First of all i must say that i have the bot updated and i created and HQ folder in the sd card from windows, from the Files Administrator (that came with LG Android 7.1) and from EZ File explorer and in the three cases i have this same error:

Error opening file: /sdcard/HQ/2018-06-12_19-06-27_1.png (No such file or directory)
adb: error: remote object '/sdcard/HQ/2018-06-12_19-06-27_1.png' does not exist
←[1;31m[-]←[1;m IOError: [Errno 2] No such file or directory: 'C:\Users\Dionisio Rey\Desktop\hq\hq4 happy
dinoa\HQBot\2018-06-12_19-06-27_1.png'

Could it be some problem with my sd card? I figured that in windows my sdcard appears with the name MicroSD could this be causing the problem? Is there anyway to change its name?
I must change the code to refer to MicroSd instead of SDCArd?

Please help!! ERROR IN WINDOWS

I ve followed all the instructions in README.MD but i cannot even test the sample questions.Can anyine figure out how i can solve this?
capture1120

No Answers...

Hi, sometimes is gets 0 results for every answer and says pick the best. How can I make it search more?

Won't run

No matter how I try to run it, I used your installation instructions but I get an error:
File "bot.py", line 120
except ValueError, KeyError:
^
SyntaxError: invalid syntax

Google's api

I can't enable those api, since it asking for my credit card number. how to get around it?

How do I use my own image?

How can I use this with my own image?

I type bot.py -i C:\image

It says there is no directory. But there is a file called image on my C drive. How exactly do I have to type it for it to find the file?

NoSection error

I am trying to use this on windows but it gives this error
A:\test\play2>python test.py -v -i test_question2.png �[1;31m[-]�[1;m NoSectionError: No section: 'bot_config'

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.