Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
Parse the Aussie date correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
henare committed Mar 17, 2014
1 parent 75dccd5 commit 8348cf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scraper.rb
@@ -1,5 +1,6 @@
require 'scraperwiki'
require 'mechanize'
require 'date'

agent = Mechanize.new

Expand Down Expand Up @@ -27,7 +28,7 @@ def extract_applications_from_page(page)
when /properties/i
da[:address] = value.at('a').inner_text.strip #site incorrectly repeats the same address
when /submitted/i
da[:date_received] = value.inner_text.strip
da[:date_received] = Date.parse(value.inner_text.strip, 'd/m/Y')
when /description/i
da[:description] = value.inner_text.strip.sub(/planning permit/i, "")
end
Expand Down

0 comments on commit 8348cf3

Please sign in to comment.