Planning applications from all 35 London local planning authorities
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

20 rindas
593 B

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