Skip to content
Browse files

Add scraper for Griffith

  • Loading branch information...
1 parent c52008a commit 2f5bbaab3b6ba810d893cbaebacce14053909be3 @andrewharvey andrewharvey committed Jul 9, 2010
Showing with 25 additions and 1 deletion.
  1. +2 −1 scraper_factory.rb
  2. +23 −0 scrapers/griffith_scraper.rb
View
3 scraper_factory.rb
@@ -87,7 +87,8 @@ def self.scrapers
WarringahScraper.new("Warringah Council", "Warringah", "NSW"),
YarraScraper.new("City of Yarra", "Yarra City", "VIC"),
LeichhardtScraper.new("Leichhardt Council", "Leichhardt", "NSW"),
- WaggaWaggaScraper.new("City of Wagga Wagga", "Wagga Wagga", "NSW")
+ WaggaWaggaScraper.new("City of Wagga Wagga", "Wagga Wagga", "NSW"),
+ GriffithScraper.new("Griffith City Council", "Griffith", "NSW")
]
end
View
23 scrapers/griffith_scraper.rb
@@ -0,0 +1,23 @@
+require 'info_master_scraper'
+
+class GriffithScraper < InfoMasterScraper
+ def applications(date)
+ base_path = "http://infomaster.griffith.nsw.gov.au/datracking/modules/applicationmaster/"
+ base_url = base_path + "default.aspx"
+ raw_table_values(date, "#{base_url}?page=search", 1).map do |values|
+ da = DevelopmentApplication.new(
+ :application_id => extract_application_id(values[1]),
+ :date_received => extract_date_received(values[2]),
+ :address => extract_address(values[3]),
+ :description => split_lines(values[3])[1]
+ )
+
+ application_number = da.application_id
+ application_year=""
+
+ da.info_url = URI.escape(base_path + extract_info_url(values[0]))
+ da.comment_url = da.info_url
+ da
+ end
+ end
+end

0 comments on commit 2f5bbaa

Please sign in to comment.
Something went wrong with that request. Please try again.