SwitchScraper is a Python project designed to scrape the Nintendo Switch store for game deals. This project uses Playwright for browser automation.
To set up the project, follow these steps:
git clone https://github.com/alyssadsouza/SwitchScraper.git
cd SwitchScraperIt is recommended to use a virtual environment to manage dependencies. You can create and activate a virtual environment using the following commands:
python3 -m venv venv
source venv/bin/activate # on macOS and Linux
venv\Scripts\activate # or WindowsInstall the required packages using pip:
pip install -r requirements.txtEnsure you have Playwright installed and set up by running:
playwright installAfter setting up the environment and installing the dependencies, you can run the scraper by with the main.py script.
python main.pyThis will open a Chromium browser, navigate to the Nintendo Switch store game deals page, and scrape the available deals.
SwitchScraper/
│
├── scraper.py # Contains the Scraper and SwitchScraper classes
├── main.py # Main script to run the scraper
├── constants.py # Contains constants used in the project
├── requirements.txt # Lists the dependencies
└── README.md # Project documentation