Planning applications from all 35 London local planning authorities
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

il y a 5 ans
il y a 5 ans
il y a 5 ans
il y a 5 ans
12345678910111213141516171819
  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