Planning applications from all 35 London local planning authorities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
458 B

  1. require 'uk_planning_scraper'
  2. require 'scraperwiki'
  3. auths = UKPlanningScraper::Authority.tagged('london')
  4. auths.each_with_index do |auth, i|
  5. begin
  6. puts "#{i + 1} of #{auths.size}: Scraping #{auth.name}"
  7. apps = auth.scrape({ decided_days: ENV['MORPH_DAYS'].to_i })
  8. ScraperWiki.save_sqlite([:authority_name, :council_reference], apps)
  9. puts "#{auth.name}: #{apps.size} application(s) saved."
  10. rescue StandardError => e
  11. puts e
  12. end
  13. end