This is a scraper that runs on Morph. To get started see the documentation.
It scrapes development applications for Townsville City Council from the council's ePlanning site and feeds PlanningAlerts.
Issues with this authority are tracked in the shared issue tracker: planningalerts-scrapers/issues#1460.
thisweek, lastweek, thismonth or lastmonth) on one page. The results are all in the page and paged in the browser with JavaScript. It covers development, building and plumbing applications, including referral agency responses (CAR) and changes to approvals.div.result with the reference linking to its details page, the description, one or more addresses and a hidden "More" section with the lodged date and status. The scraper uses the first address.No applications lodged <period> and carries on, even if the page gives no count. PlanningAlerts flags long gaps in new applications itself.o=xml), used by the multiple_icon scraper, returns an error page, so this scraper reads the HTML. If another XC.Track council needs its HTML scraped too, this could become a multiple_* scraper.
bundle install
bundle exec ruby scraper.rb
To run the tests and style checks:
bundle exec rake
bundle exec rubocop
The tests use saved copies of the site's pages in spec/fixtures/, cut down to one result 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 thisweek, lastweek, thismonth or lastmonth. By default both thismonth and lastmonth are scraped. Applications on public notification are always scraped.MORPH_DEBUG - optional; when set, prints each record as it is saved.Expected output is a heading for each list, a Storing <reference> - <address> line for each application, a count per list and a final total, for example:
``` Running ruby 3.2.2
Scraping applications lodged thismonth... Storing CAR26/0574 - 40 Daintree Drive BUSHLAND BEACH QLD 4818 Storing CAR26/0575 - 21 Ranana Place MOUNT LOW QLD 4818 ... Storing POS26/0141 - 112 Gollogly Lane RASMUSSEN QLD 4815 Storing OPW25/0032.10 - 155 Lynam Road GUMLOW QLD 4815 Finished thismonth - processed 72 records
Scraping applications lodged lastmonth... Storing CAR26/0508 - 6 Coleman Street HYDE PARK QLD 4812 Storing CAR26/0511 - 23 Crauford Street WEST END QLD 4810 ... Storing POS26/0128 - 16 Clayton Street HERMIT PARK QLD 4812 Storing RAL26/0108 - 10 Willeroo Court ANNANDALE QLD 4814 Finished lastmonth - processed 139 records
Scraping applications on public notification... Storing MCU26/0034 - 128 Manton Quarry Road CALCIUM QLD 4816 Storing MCU26/0051 - 18 Hinchinbrook Drive THURINGOWA CENTRAL QLD 4817 ... Storing MCU26/0093 - 76 Gerard Street CURRAJONG QLD 4812 Storing MCU26/0112 - 11 Springfield Street YABULU QLD 4818 Finished on notification - processed 5 records
Finished - saved 213 records ```
A run takes under a minute (20 to 35 seconds on 31 October 2026).
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 it is described as "Development Application". With no details link it links to the search page. With an unreadable lodged or notification date, that date 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.
An application on public notification is often also in the lodged lists. Records are saved by council_reference, so the second save updates the same record and adds the notification dates. The final total counts each record once, so it can be less than the sum of the per-list counts (213 rather than 216 above). The total is usually a couple of hundred. The records are saved to data.sqlite in the working directory.
To download data sign in with GitHub
rows 10 / 7042
| date_scraped | description | info_url | date_received | council_reference | address | comment_url | on_notice_from | on_notice_to |
|---|---|---|---|---|---|---|---|---|
|
2011-09-11
|
Request to Extend the Relevant Period associated with R279.2572
|
2011-09-09
|
RC11/0015.02
|
82 Dunlop Street KELSO QLD 4815
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
Request Approval to Allow Construction in 2 Stages associated with R279.2572
|
2011-09-02
|
RC11/0015.01
|
82 Dunlop Street KELSO QLD 4815
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
Detached House - Steep slopes Overlay and height Variation
|
2011-09-01
|
MC11/0071
|
29 Braemar Crescent CASTLE HILL QLD 4810
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
Detached House (Lot 1 RP 745347 Lease LZ No. 9)
|
2011-09-01
|
MI11/0049
|
7 - 9 Rae Crescent (Private) Cleveland Palms NOME QLD 4816
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
Detached House - Steep Lands Overlay
|
2011-08-30
|
MC11/0069
|
348 Stanley Street NORTH WARD QLD 4810
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
Side Retaining Wall
|
2011-09-02
|
OP11/0098
|
12 Clifton Street NORTH WARD QLD 4810
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
Congregational Mixed-Use Facility ancillary to existing Educational Establishment and demolition of Four (4) site buildings including a building listed on the Local Heritage Database
|
2011-08-30
|
MC11/0070
|
45 The Strand NORTH WARD QLD 4810
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
North Shore Precinct 5 - Operational Works (Sewage Pump Station BU05 Rising Main and Gravity Sewer and Acid Sulphate Soils Test) associated with RC10/0189)
|
2011-08-30
|
OP11/0095
|
0 North Shore Boulevard BURDELL QLD 4818
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
North Shore Stage 520 - Operational Works associated with RC10/0189 (23 lots)
|
2011-09-05
|
OP11/0099
|
0 North Shore Boulevard BURDELL QLD 4818
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
|
|
2011-09-11
|
Vacuum Truck Waste Composting and Soil Conditioning Manufacturing
|
2011-09-09
|
MC11/0073
|
111 Shaw Road SHAW QLD 4818
|
mailto:eplanning@townsville.qld.gov.au
|
|
|
To download data sign in with GitHub
rows 10 / 3157
| id | name | value_blob | type |
|---|---|---|---|
|
1
|
RC12/0052.04
|
RC12/0052.04
|
string
|
|
2
|
MC08/0299.11
|
MC08/0299.11
|
string
|
|
3
|
MI11/0046.03
|
MI11/0046.03
|
string
|
|
4
|
MI08/0077.06
|
MI08/0077.06
|
string
|
|
5
|
MC13/0020.01
|
MC13/0020.01
|
string
|
|
6
|
RC13/0046.02
|
RC13/0046.02
|
string
|
|
7
|
RC12/0010.10
|
RC12/0010.10
|
string
|
|
8
|
OP12/0113.11
|
OP12/0113.11
|
string
|
|
9
|
OP12/0109.09
|
OP12/0109.09
|
string
|
|
10
|
OP12/0104.23
|
OP12/0104.23
|
string
|
Average successful run time: half a minute
Total run time: 2 days
Total cpu time used: 24 minutes
Total disk space used: 3.05 MB