The project contains a Python script that utilizes Selenium to scrape quizzes from a specified URL. The QuizScraper class enables users to fetch quiz titles, URLs, and questions along with their corresponding answer choices from the targeted web page. It also provides functionality to answer quizzes automatically. The script is designed to handle the login process, extract quiz data, and store it in an organized dictionary format.
To run this project, you need to install the following dependencies:
- Python 3
- Chromedriver
- Selenium
- dotenv
You can install the necessary dependencies using pip:
pip install selenium
pip install python-dotenvTo use the project, follow these steps:
- Clone the repository.
- Set up a
.envfile with the required environment variables:
URL=your_url_here
SELENIUM_USERNAME=your_username_here
SELENIUM_PASSWORD=your_password_here
BROWSER_BINARY_LOCATION=your_browser_binary_location_here- Run the script using the following command:
python main.pyContributions to the project are welcome. To contribute, follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes and commit them.
- Push your changes to the branch.
- Submit a pull request.
This project is licensed under the MIT License.