statement 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/statement/scraper.rb +17 -3
- data/lib/statement/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a8ae6bc7ccdba1e7b0a9386783850c17087d271
|
4
|
+
data.tar.gz: b4866d9e6aa21842e80fbddf4976c3c9f40e7977
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b76d809d6016d596c97676d74105f2a808ada79f50a1ff8d5c0eba2776430125a9c0eba2a06f3c10514d756efb6a2049ebaf7e9ce0769bbf418b7e339c5125e
|
7
|
+
data.tar.gz: d2a535998e0107b8b3d904d2616d85a8a7d3312bb3a13e0877b5f3f821986ac64d38643b363d5745b9e2031b6c62aa8ea0ccfbfa0f8026b4cf2233447d72aea2
|
data/lib/statement/scraper.rb
CHANGED
@@ -31,7 +31,7 @@ module Statement
|
|
31
31
|
def self.member_methods
|
32
32
|
[:crenshaw, :capuano, :cold_fusion, :conaway, :chabot, :freshman_senators, :klobuchar, :billnelson, :crapo, :boxer,
|
33
33
|
:vitter, :inhofe, :document_query, :swalwell, :fischer, :clark, :edwards, :culberson_chabot_grisham, :barton,
|
34
|
-
:welch, :sessions, :gabbard, :costa, :farr, :mcclintock, :olson, :schumer, :lamborn, :walden,
|
34
|
+
:welch, :sessions, :gabbard, :costa, :farr, :mcclintock, :olson, :schumer, :lamborn, :walden, :boehner,
|
35
35
|
:bennie_thompson, :speier, :poe, :grassley, :bennet, :shaheen, :keating, :drupal, :jenkins, :durbin_burr]
|
36
36
|
end
|
37
37
|
|
@@ -42,7 +42,7 @@ module Statement
|
|
42
42
|
def self.member_scrapers
|
43
43
|
year = Date.today.year
|
44
44
|
results = [crenshaw, capuano, cold_fusion(year, nil), conaway, chabot, klobuchar(year), billnelson(page=0),
|
45
|
-
document_query(page=1), document_query(page=2), swalwell(page=1), crapo, boxer, grassley(page=0),
|
45
|
+
document_query(page=1), document_query(page=2), swalwell(page=1), crapo, boxer, grassley(page=0),
|
46
46
|
vitter(year=year), inhofe(year=year), fischer, clark(year=year), edwards, culberson_chabot_grisham(page=1), barton, welch,
|
47
47
|
sessions(year=year), gabbard, costa, farr, olson, schumer, lamborn(limit=10), walden, bennie_thompson, speier,
|
48
48
|
poe(year=year, month=0), bennet(page=1), shaheen(page=1), perlmutter, keating, drupal, jenkins, durbin_burr(page=1)].flatten
|
@@ -246,6 +246,19 @@ module Statement
|
|
246
246
|
results
|
247
247
|
end
|
248
248
|
|
249
|
+
def self.boehner(page=1, year=Date.today.year)
|
250
|
+
results = []
|
251
|
+
url = "http://boehner.house.gov/category/press-releases/page/#{page}/"
|
252
|
+
doc = open_html(url)
|
253
|
+
return if doc.nil?
|
254
|
+
(doc/:article).each do |row|
|
255
|
+
month = row.children[1].children[1].children[1].children[0].text
|
256
|
+
day = row.children[1].children[1].children[1].children[1].text
|
257
|
+
results << { :source => url, :url => "http://boehner.house.gov"+row.children[12].children[1].children[0]['href'], :title => row.children[1].children[1].children[3].text, :date => Date.parse(month+" "+day+" "+year.to_s), :domain => 'boehner.house.gov'}
|
258
|
+
end
|
259
|
+
results
|
260
|
+
end
|
261
|
+
|
249
262
|
def self.capuano
|
250
263
|
results = []
|
251
264
|
base_url = "http://www.house.gov/capuano/news/"
|
@@ -682,7 +695,8 @@ module Statement
|
|
682
695
|
{"buddycarter.house.gov" => 27},
|
683
696
|
{"grothman.house.gov" => 27},
|
684
697
|
{"beyer.house.gov" => 27},
|
685
|
-
{"kathleenrice.house.gov" => 27}
|
698
|
+
{"kathleenrice.house.gov" => 27},
|
699
|
+
{"hanna.house.gov" => 27}
|
686
700
|
]
|
687
701
|
domains.each do |domain|
|
688
702
|
doc = open_html("http://"+domain.keys.first+"/news/documentquery.aspx?DocumentTypeID=#{domain.values.first}&Page=#{page}")
|
data/lib/statement/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Willis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|