A web scraper for extracting parish information from the Stockton Diocese parish finder website.
- Python 3.14 or higher
- Chrome browser installed on your system
- Clone the repository:
git clone <repository-url>
cd scraper-
Install Chrome Webdriver (stable): https://googlechromelabs.github.io/chrome-for-testing
-
Setup venv
python3 -m venv venv
source venv/bin/activate- Install dependencies:
pip3 install selenium webdriver-managerRun the scraper:
python3 main.pyThe script will:
- Launch a Chrome browser instance
- Navigate to the Stockton Diocese parish finder
- Click on categories 1, 3, 5, 7, and 9
- Print the names of parishes displayed in each category
The scraper uses Selenium WebDriver to automate browser interactions:
- Disables geolocation permissions
- Automatically manages ChromeDriver installation
- Iterates through specific category indices
- Extracts and displays visible parish names
- The script includes a 2-second delay between category clicks to allow page content to load
- Geolocation permissions are disabled to prevent browser prompts
- The browser will close automatically after the script completes