Tools to automate the tracking of Ottawa City Councillor voting records.
- Python 3.12+
git
git clone <repository-url>
cd ottawacitycouncilvotingrecordspython3.12 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython -m ottawa_city_scraper.cli --start-date 2026-03-01 --end-date 2026-03-18Optional arguments:
--output-root: base directory for outputs (default:datasets)--meeting-name: only scrape meetings whose name exactly matches the provided value, case-insensitive--verify-cert: enforce TLS certificate verification (default currently disables cert validation for self-signed endpoints)
Run outputs are written under:
<output-root>/runs/<start>_to_<end>_<timestamp>/
You can run the CLI either as a module or as a script:
python -m ottawa_city_scraper.cli --start-date 2026-02-25 --end-date 2026-02-26python ottawa_city_scraper/cli.py --start-date 2026-02-25 --end-date 2026-02-26Common examples:
python ottawa_city_scraper/cli.py --start-date 2026-02-25 --end-date 2026-02-26
python ottawa_city_scraper/cli.py --start-date 2026-02-25 --end-date 2026-02-26 --meeting-name "City Council"
python ottawa_city_scraper/cli.py --start-date 2026-02-25 --end-date 2026-02-26 --output-root datasets
python ottawa_city_scraper/cli.py --start-date 2026-02-25 --end-date 2026-02-26 --verify-certArguments:
--start-date: required date range start inYYYY-MM-DDformat. Defaults to today.--end-date: required date range end inYYYY-MM-DDformat. Defaults to tomorrow.--meeting-name: optional exact meeting-name filter, matched case-insensitively.--output-root: optional base directory for generated run folders. Defaults todatasets.--verify-cert: optional flag to enforce TLS certificate verification.
What the CLI does:
- Fetches the Ottawa eScribe calendar meetings for the requested date range.
- Filters to English
PostMinutesHTML documents. - Optionally narrows the meetings to a single meeting name such as
City Council. - Scrapes and parses each matching meeting minutes page into a meeting-specific JSON file.
Output files:
calendar_meetings.json: raw calendar-meetings API response.- One parsed meeting-minutes JSON file per matching meeting, named like:
2026-02-25_city_council_d81e8843-78b0-45b1-9ccd-fcc20e8b2526_postminutes.json
pip install -r requirements.txt
pytestdeactivate