Skip to content

Commit

Permalink
feature: get policy ids from twfy_policies scraper
Browse files Browse the repository at this point in the history
Only two for now
  • Loading branch information
tmtmtmtm committed Jul 26, 2014
1 parent 3d35d1c commit b92313d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,12 @@ def motions


require 'scraperwiki'
require 'json'

policy_ids = [363]
@POLICIES = 'https://api.morph.io/tmtmtmtm/theyworkforyou_policies/data.json?query=select%20id%20from%20data&key='
url = @POLICIES + ENV['MORPH_KEY']
warn "Fetching <#{url}>"
policy_ids = JSON.parse(open(url).read ).map { |e| e['id'] }.take(2)

def store_policy(pid)
policy = PolicyScraper.new("policy.php?id=#{pid}").as_hash
Expand Down

0 comments on commit b92313d

Please sign in to comment.