A high-performance Python-based data scraper designed to extract registered service provider details from the Australian National Disability Insurance Scheme (NDIS) portal.
This project uses an advanced hybrid architecture: it leverages Playwright to seamlessly bypass Cloudflare anti-bot protection, and then intercepts the underlying JavaScript network requests (cURL / API responses) to capture the raw JSON payload. This eliminates the need for brittle HTML parsing and ensures fast, resilient data collection.
- Anti-Bot Bypass: Utilizes Playwright's automated browser engine to handle Cloudflare challenges that completely block standard
requestsscripts. - Network Interception: Captures the raw JSON network payloads directly from the browser background, providing highly accurate data extraction.
- Data Handling & Structured Output: Leverages a secondary Pandas pipeline
data_cleaning.ipynbto clean raw JSON payloads, handle missing records, deduplicate fields and export final provider lists into production-ready Excel and CSV formats. - Isolated Environment: Fully self-contained configuration with zero global package dependencies.
Follow these steps to set up and run the scraper on your local machine:
Make sure you have Python 3.10+ installed on your system.
Open your terminal (or VS Code) directly in the project directory:
git clone https://github.com/MilanGole/ndis-provider-scraper.git
cd ndis-provider-scraperCreate a clean, isolated virtual environment inside the project directory so the scraper's packages do not interfere with your system-wide Python installation:
python -m venv .venvTell your terminal to start using your newly created virtual environment:
On Windows (PowerShell):
.\.venv\Scripts\Activate.ps1On Mac/Linux:
source .venv/bin/activateSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope ProcessEnsure your local pip package manager is updated and install the required libraries from the requirements.txt file:
python -m pip install --upgrade pip
python -m pip install -r requirements.txtDownload the required Chromium engine used by the automated browser to handle the Cloudflare handshake:
python -m playwright install chromiumExecute the core script to bypass defenses and extract the raw network API data:
python scraper.pyOpen the Jupyter Notebook to clean the extracted raw data and export it to Microsoft Excel/CSV:
jupyter notebook data_cleaning.ipynb(Note: Ensure you have Jupyter installed via your requirements.txt to run the processing file).
ndis-provider-scraper/
├── .venv/ # Local Python virtual environment (ignored by Git)
├── scraper.py # Script 1: Playwright API interception
├── data_cleaning.ipynb # Script 2: Pandas data cleaning pipeline
├── requirements.txt # Project dependencies (Playwright, pandas, etc.)
├── README.md # Project documentation
└── .gitignore # Tells Git to ignore .venv and cached files
This project is licensed under the MIT License.