This is a scraper that runs on Morph. To get started see the documentation.
It scrapes development applications for Canterbury-Bankstown Council from the council's DA tracker and feeds PlanningAlerts.
Issues with this authority are tracked in the shared issue tracker: planningalerts-scrapers/issues#1459.
yesterday, thisweek, lastweek, thismonth or lastmonth) on one page, with no paging. It covers development applications, complying development and construction certificates, including those from private certifiers.article.application-result-card with the reference, a Type - description paragraph, and dt/dd pairs for Address and Lodged.No applications lodged <period> and carries on, even if the page gives no count. PlanningAlerts flags long gaps in new applications itself.
bundle install
bundle exec ruby scraper.rb
To run the tests and style checks:
bundle exec rake
bundle exec rubocop
The tests use a saved copy of the tracker's page in spec/fixtures/lodged.html, cut down to one card per case, with made-up references and addresses. They don't contact the council's site. A coverage summary is printed at the end, and the full report is written to coverage/index.html.
Environment variables:
MORPH_AUSTRALIAN_PROXY - optional; when set (e.g. http://morph:password@au.proxy.oaf.org.au:8888) all requests go through the Australian proxy.MORPH_PERIOD - optional; one of yesterday, thisweek, lastweek, thismonth or lastmonth. By default both thismonth and lastmonth are scraped.MORPH_DEBUG - optional; when set, prints each record as it is saved.Expected output is a heading for each period, a Storing <reference> - <address> line for each application, a count per period and a final total, for example:
``` Running ruby 3.2.2
Scraping applications lodged thismonth... Storing CD-1556/2026 - 94 Old Kent Road MOUNT LEWIS NSW 2190 Storing CD-1555/2026 - 92 Old Kent Road MOUNT LEWIS NSW 2190 ... Storing CC-401/2026 - 71 Helen Street SEFTON NSW 2162 Storing CC-400/2026 - 52 Roberts Road GREENACRE NSW 2190 Finished thismonth - processed 238 records
Scraping applications lodged lastmonth... Storing CD-1363/2026 - 43 Victor Avenue PICNIC POINT NSW 2213 Storing CD-1362/2026 - 13 Byloss Street CHESTER HILL NSW 2162 ... Storing DA-1044/2026 - 7 Sir Joseph Banks Street BANKSTOWN NSW 2200 Storing CC-360/2026 - 808 Henry Lawson Drive PICNIC POINT NSW 2213 Finished lastmonth - processed 213 records
Finished - saved 451 records ```
An application with no application number or address is skipped with a Skipping bad application line, and the total then also says how many were skipped. Other gaps don't skip it. With no description of its own it gets its application type, for example "Development Application". With no details link it links to the tracker's search page. With an unreadable lodged date, date_received is left out and a warning is printed. The run stops with an error once more than 10 + 20% of the saved count have been skipped.
The total is usually a few hundred. The records are saved to data.sqlite in the working directory.
To download data sign in with GitHub
rows 10 / 33967
| date_scraped | description | info_url | date_received | council_reference | address | comment_url |
|---|---|---|---|---|---|---|
|
2012-08-22
|
Torrens Title Subdivision
|
2012-08-01
|
DA-579/2012
|
2 Kawana Street, BASS HILL NSW 2197
|
||
|
2012-08-22
|
Demolition of existing structures and construction of an attached dual occupancy with torrens title subdivision
|
2012-08-01
|
DA-580/2012
|
42 Mc Girr Street, PADSTOW NSW 2211
|
||
|
2012-08-22
|
Alterations and additions to existing warehouse including new driveway, mezzanine, storage area in roof space and updated facade
|
2012-08-01
|
DA-581/2012
|
127 Eldridge Road, CONDELL PARK NSW 2200
|
||
|
2012-08-22
|
Awning to Rear of Premises
|
2012-08-01
|
DA-582/2012
|
91 Dutton Street, YAGOONA NSW 2199
|
||
|
2012-08-22
|
Use of Premises as a Laser Hair Removal Clinic
|
2012-08-02
|
DA-583/2012
|
184 Tower Street, PANANIA NSW 2213
|
||
|
2012-08-22
|
Demolition of Existing Dwelling and Construction of an Attached Dual Occupancy with Torrens Title Subdivision
|
2012-08-02
|
DA-584/2012
|
34 Wilberforce Road, REVESBY NSW 2212
|
||
|
2012-08-22
|
Demolition of existing structures and construction of an attached dual occupancy with torrens title subdivision
|
2012-08-03
|
DA-585/2012
|
13 Greendale Crescent, CHESTER HILL NSW 2162
|
||
|
2012-08-22
|
Alterations and additions to existing dwelling including first floor addition
|
2012-08-03
|
DA-586/2012
|
10 Mactier Avenue, MILPERRA NSW 2214
|
||
|
2012-08-22
|
Carport and Two (2) Awnings
|
2012-08-03
|
DA-587/2012
|
32 Mae Crescent, PANANIA NSW 2213
|
||
|
2012-08-22
|
To extend the existing use as an educational establishment at 89 - 97 Greenacre Road and 80 - 84 Mimosa Road to include the following lots (addressed as 83 - 87 Greenacre Road) - Lot 3 DP 553862, Lot 21 DP 579408, Lot 22 DP 579408.
|
2012-08-03
|
DA-588/2012
|
89 Greenacre Road, GREENACRE NSW 2190
|
Average successful run time: less than a minute
Total run time: 2 months
Total cpu time used: about 1 hour
Total disk space used: 17.4 MB