|
@@ -5,12 +5,11 @@ require 'rest-client' |
|
|
require 'json' |
|
|
require 'json' |
|
|
require 'pp' |
|
|
require 'pp' |
|
|
|
|
|
|
|
|
morph_api_url = 'https://api.morph.io/adrianshort/inlink-scraper/data.json' |
|
|
|
|
|
|
|
|
|
|
|
result = RestClient.get(morph_api_url, params: { |
|
|
|
|
|
|
|
|
result = RestClient.get(ENV['MORPH_API_URL'], params: { |
|
|
key: ENV['MORPH_API_KEY'], |
|
|
key: ENV['MORPH_API_KEY'], |
|
|
query: "select * from applications" |
|
|
query: "select * from applications" |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
apps = JSON.parse(result) |
|
|
apps = JSON.parse(result) |
|
|
ScraperWiki.save_sqlite(['authority_name', 'council_reference'], apps, 'applications') |
|
|
|
|
|
|
|
|
ScraperWiki.save_sqlite( \ |
|
|
|
|
|
['authority_name', 'council_reference'], apps, 'applications') |