This project is a web scraper for extracting report sales by item data from the Loyverse dashboard using Selenium and saving the data to an Excel file.
-
Clone the repository:
git clone https://github.com/yourusername/loyverse-data-scraper.git cd loyverse-data-scraper -
Create and activate a virtual environment:
Mac/Linux:
python3 -m venv venv source venv/bin/activateWindows:
python -m venv venv .\venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Install Chromedriver:
Mac:
brew install chromedriver
Linux:
sudo apt-get install chromium-chromedriver
Windows: Download Chromedriver from official site and add to system path.
-
Create a
.envfile in the root directory and add your login credentials:EMAIL=your_email@example.com PASSWORD=your_password
-
Run the scraper script:
python main.py
This will open a Chrome browser, log into Loyverse, navigate to the sales report page, and save the data to
loyverse_data.xlsx.
The following environment variables are used in the project:
EMAIL: Your Loyverse account email.PASSWORD: Your Loyverse account password.
loyverse-data-scraper/
├── .env # Environment variables
├── .gitignore # Git ignore file
├── README.md # Project readme file
├── requirements.txt # Python dependencies
├── scraper.py # Main scraper script
├── venv/ # Virtual environment directory
selenium: A browser automation tool.pandas: A data manipulation and analysis library.python-dotenv: A tool to read environment variables from a.envfile.openpyxl: A library to read/write Excel files.
Install all dependencies using:
pip install -r requirements.txtThis project is licensed under the MIT License.