This is my xtra math bot I made using Slenium, Pytesseract, and OpenCV. There are 2 parts to this project: Logging in and Answering Questions
LoggingIn.mp4
First, the bot logs in with selenium, a module which can minipulate key presses and mouse clicks. The bot enters your email, student name, and pin code into the text boxes and presses enter, continuing onto the questions phase.
Questions.mp4
After the logging in phase is completed, it moves on to the answering questions phase. First, it takes 2 or 1 screenshot(s) (the top and bottom number or the whole area where the questions are in) and saves them in the path you specified. Next it uses 2 modules, pytesseract and openCV, to process and read the numbers and turn them into python strings. After that, the code turns the numbers into integers and it adds/subtracts/multiplies/divides them and stores it as the result. Finally, the program types in the answer with keyboard automation using pyautogui.
Keep the code running until it says you have completed your program.
This program is built with the following languages:
- Python
To get this project running follow these steps
- Clone the Repository
git clone https://github.com/OmPatel5/XtraMathBot.git- Install Selenium
pip install selenium- Install Chrome WebDriver
Install Chrome Webdriver asociated with the version of your chrome you are using
https://sites.google.com/a/chromium.org/chromedriver/downloads- Install Tesseract-OCR
Install Tesseract-OCR with associated windows version
https://github.com/UB-Mannheim/tesseract/wikiThen enter this command in terminal to install tesseract on your virtual environment:
pip install pytesseract- Install the following packages:
Install Pillow
pip install PillowInstall OpenCV
pip install opencv-pythonInstall Pyautogui
pip install pyautoguiInstall Pynput
pip install pynputOm Patel - omp091216@gmail.com
Project Link: https://github.com/OmPatel5/XtraMathBot