This software must be use only with educational purposes, any other use with no educational intent is at your own risk. This Python script are not developed with any intention of damaging Q12. I do not encourage anyone to use this during a live game and this is purely for educational purposes.
This bot is an inspired version of sushant10's HQ_Bot
- Make a requirements file
- Real multithreading URLs.
- Simplify questions.
- Processing of JSON file.
- Implement wikipedia library instead of googlesearch.
- Collect Screenshots and log of answers.
Use Python 3 and ADB. In particular the packages/libraries used are...
- Google-Search-API - Google searching
- Requests - Requests library
- beautifulsoup4 - Parse google searches/html
- lxml - Beautifulsoup parser
- pytesseract - Google's free/open source OCR (requires seperate installtion)
- opencv2 - Image maniplulation
- Time and Os libraries
- Parallel and delayed from joblib
I recommend before any use to change values of coordinates according to your mobile screenshot in functions parse_question_lines()
and parse_options()
. With the help of Image-Map you can do this.
Remember that OpenCV doesn't have the same conversion as Image-Map
OpenCV: gray[y:y+h,x:x+w]
# Box
Image-Map: coords="129,1037,923,1115"
# Uppper-left edge and Downer-Right edge
Make sure all packages above are installed.The code expects the phone to be plugged in Debugging mode. (Only Android supported)
$ git clone https://github.com/1c3t0rm/Q12_bot
$ cd Q12_bot
$ pip3 install -r requirements.txt (NOT DONE YET)
$ python3 parallel_q12_bot.py
Press s to screenshot or q to quit:
s
The MIT License (MIT)