Planning applications from all 35 London local planning authorities
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

16 行
487 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 UKPlanningScraper::SystemNotSupportedError => e
  11. puts e
  12. end
  13. end