Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adityasworks/websudoku-solver
This Python script automates solving Sudoku puzzles from websudoku.com using browser automation with Selenium and data extraction with BeautifulSoup.
https://github.com/adityasworks/websudoku-solver
automation beautifulsoup python selenium sudoku sudoku-solver web-scraping webscraping
Last synced: 15 days ago
JSON representation
This Python script automates solving Sudoku puzzles from websudoku.com using browser automation with Selenium and data extraction with BeautifulSoup.
- Host: GitHub
- URL: https://github.com/adityasworks/websudoku-solver
- Owner: AdityasWorks
- Created: 2024-07-11T10:17:33.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-13T15:37:52.000Z (7 months ago)
- Last Synced: 2024-11-16T11:13:12.948Z (3 months ago)
- Topics: automation, beautifulsoup, python, selenium, sudoku, sudoku-solver, web-scraping, webscraping
- Language: Python
- Homepage:
- Size: 838 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebSudoku Solver
This Python script automates solving Sudoku puzzles from [WebSudoku](https://www.websudoku.com/) using browser automation with Selenium and data extraction with BeautifulSoup.
## Demo
[![Solver](https://github.com/AdityasWorks/WebSudoku-Solver/blob/main/demo/Websudoku%20Demo.mp4)](https://github.com/AdityasWorks/WebSudoku-Solver/assets/111555593/30bca1a3-5304-46af-9957-167d77b8d5bc
)## Features
- **Automated Sudoku Solving:** Solves Sudoku puzzles from WebSudoku based on user-provided difficulty level and puzzle ID.
- **Browser Automation:** Utilizes Selenium to interact with WebSudoku, selecting difficulty levels, inputting puzzle IDs, and extracting puzzle grid values.
- **Backtracking Algorithm:** Implements a backtracking algorithm to solve the Sudoku puzzles retrieved from WebSudoku.
- **Numpy Integration:** Uses Numpy for efficient matrix operations, handling the puzzle grid as a 2D array.## Requirements
Ensure you have Python 3.x installed along with the following Python libraries (installable via `pip`):
- numpy
- beautifulsoup4
- seleniumYou can install these dependencies using the provided `requirements.txt` file:
## Usage
1. **Clone the Repository:**
```bash
git clone https://github.com/your-username/websudoku-solver.git
cd websudoku-solver
2. **Install Dependencies:**```bash
pip install -r requirements.txt3. **Run the Script:**
```bash
python solver.py
```
1. Follow the on-screen prompts to enter the difficulty level (`Easy`, `Medium`, `Hard`, `Evil`) and the Sudoku puzzle number.5. **View Results:**
After running the script go back to your sudoku and select the first cell.