-
Notifications
You must be signed in to change notification settings - Fork 2
/
scraper.rb
34 lines (33 loc) · 1014 Bytes
/
scraper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# require 'scraperwiki'
# require 'mechanize'
# require 'date'
#
# url = 'http://www.charterstowers.qld.gov.au/recently-submitted-applications'
# agent = Mechanize.new
#
# page = agent.get url
#
# table = page.search(:table).last
#
# table.search(:tr).each_with_index do |row,number|
# next if number == 0 # Skip header
#
# columns = row.search(:td)
#
#
# date_received = Date.strptime(columns[1].inner_text.strip, '%d/%m/%Y') rescue nil
#
# record = {
# council_reference: columns[0].inner_text,
# date_received: date_received,
# description: columns[3].inner_text,
# address: "#{columns[4].inner_text}, QLD",
# info_url: url,
# comment_url: 'mailto:mail@charterstowers.qld.gov.au',
# date_scraped: Date.today
# }
# # puts record.to_yaml
# ScraperWiki.save_sqlite([:council_reference], record)
# end
puts "Broken scraper. Commented out to make it less noisy"
puts "See https://github.com/planningalerts-scrapers/issues/issues/79"