This is a Sudoku solver script that automates the solving process using Selenium and Python. It is a bot scraper that reads a Sudoku puzzle from a web page and solves it. The solved solution is then automatically filled in on the Sudoku web page.
To use the Sudoku solver, follow the instructions below:
-
Install virtualenv:
$ pip install virtualenv
-
Create a virtual environment with the name "sudoku":
$ virtualenv sudoku
-
Activate the virtual environment:
$ source ./sudoku/bin/activate
-
Install the required dependencies:
$ pip install -r requirements.txt
-
Download the compatible version of ChromeDriver based on your Google Chrome version from https://chromedriver.chromium.org/.
-
Unzip the downloaded file.
-
Make the ChromeDriver executable:
$ chmod +x ./chromedriver
-
Move the ChromeDriver executable to the appropriate location:
$ sudo mv ./chromedriver /usr/local/share/chromedriver
-
Create symbolic links:
$ sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver $ sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
-
Verify the installation:
$ chromedriver --version
-
Install PyAutoGUI:
$ pip install pyautogui
-
Install Tkinter:
$ pip install tk
-
For Linux, install additional dependencies:
$ sudo apt-get install scrot $ sudo apt-get install python3-tk $ sudo apt-get install python3-dev
-
Update the URL in the script (
SolveSudoku
) to the desired Sudoku puzzle source. -
Run the script:
$ python sudoku_solver.py
-
The solved Sudoku puzzle will be printed to the console, and the solution will be automatically filled in on the Sudoku web page.
That's it! You can now solve Sudoku puzzles automatically using this script. Enjoy!