Installation
Get started with ScrapeAccraProperties by installing Python dependencies and setting up the Playwright browser for JavaScript-rendered scraping.Prerequisites
Before installing, ensure you have:Python 3.12+
The project requires Python 3.12 or higher
Chromium Browser
Playwright will install Chromium browser binaries
On Linux systems, you may need additional OS libraries for Playwright. The installation steps below include commands to install these dependencies.
Installation Steps
Install Python dependencies
Choose your preferred package manager:
Dependencies Installed
The following packages are installed frompyproject.toml:- scrapy
>=2.14.1- Web scraping framework - scrapy-playwright
>=0.0.46- Playwright integration for Scrapy - playwright
>=1.58.0- Browser automation library - rich
>=14.3.3- Rich terminal formatting - pandas
>=3.0.1- Data manipulation and CSV handling - notebook
>=7.5.3- Jupyter notebook support - pregex
>=2.3.3- Regex pattern builder
Install Playwright browser
Install the Chromium browser binaries required for Playwright:
Linux users: Install system dependencies
Linux users: Install system dependencies
On Linux systems, you may need additional OS libraries. Run this command to install them:This installs system dependencies like graphics libraries, font rendering libraries, and other OS-level requirements for running Chromium in headless mode.
Troubleshooting
Browser launch failures
Browser launch failures
If you encounter browser launch errors, ensure Playwright’s Chromium is installed:If the issue persists, try reinstalling with system dependencies (Linux):
Linux dependency errors
Linux dependency errors
On Linux systems, you may see errors related to missing system libraries. Run:This installs all required OS-level dependencies for running Chromium.
Python version issues
Python version issues
Ensure you’re using Python 3.12 or higher:If you have multiple Python versions installed, you may need to use
python3.12 or python3 instead of python.Virtual environment not activated
Virtual environment not activated
If using
pip installation, ensure your virtual environment is activated:Next Steps
Quick Start Tutorial
Now that you’ve installed ScrapeAccraProperties, follow the quickstart guide to scrape your first listings!