RB Kingston upon Thames planning applications
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425
  1. # This is a template for a Ruby scraper on morph.io (https://morph.io)
  2. # including some code snippets below that you should find helpful
  3. # require 'scraperwiki'
  4. # require 'mechanize'
  5. #
  6. # agent = Mechanize.new
  7. #
  8. # # Read in a page
  9. # page = agent.get("http://foo.com")
  10. #
  11. # # Find somehing on the page using css selectors
  12. # p page.at('div.content')
  13. #
  14. # # Write out to the sqlite database using scraperwiki library
  15. # ScraperWiki.save_sqlite(["name"], {"name" => "susan", "occupation" => "software developer"})
  16. #
  17. # # An arbitrary query against the database
  18. # ScraperWiki.select("* from data where 'name'='peter'")
  19. # You don't have to do things with the Mechanize or ScraperWiki libraries.
  20. # You can use whatever gems you want: https://morph.io/documentation/ruby
  21. # All that matters is that your final data is written to an SQLite database
  22. # called "data.sqlite" in the current working directory which has at least a table
  23. # called "data".