statement 1.8.12 → 1.8.13
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 +9 -6
- data/lib/statement/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0359fa04917033abb72637f7ccafaeb546c2ed2
|
4
|
+
data.tar.gz: e42c5524eda7069f724d8b13cf31e2719e943f30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ec9a58e1dcd44699921070b4c06c4f872fa8cb3715b4bedffa4db72f69653328179187b966cbe7f72e00b621ab47e434cc1592883197d7ca14e758e640b882f
|
7
|
+
data.tar.gz: 38890a5cf6fb5b17a369a03a4456310f4e63acd6d78871d59082224748df3bbf438d6ca7eb13e49d0813860ddd2c6bde8a1b28149f3062cc2fa39823518df2bc
|
data/lib/statement/scraper.rb
CHANGED
@@ -29,7 +29,7 @@ module Statement
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.member_methods
|
32
|
-
[:crenshaw, :capuano, :cold_fusion, :conaway, :chabot, :susandavis, :freshman_senators, :klobuchar, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :vitter, :
|
32
|
+
[:crenshaw, :capuano, :cold_fusion, :conaway, :chabot, :susandavis, :freshman_senators, :klobuchar, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :vitter, :inhofe, :palazzo, :roe, :document_query, :swalwell, :fischer, :clark, :edwards, :culberson_chabot_grisham, :barton, :wolf_sherman_mccaul, :welch, :sessions, :gabbard, :ellison, :costa, :farr, :mcclintock, :mcnerney, :olson]
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.committee_methods
|
@@ -39,8 +39,8 @@ module Statement
|
|
39
39
|
def self.member_scrapers
|
40
40
|
year = Date.today.year
|
41
41
|
results = [crenshaw, capuano, cold_fusion(year, nil), conaway, chabot, susandavis, klobuchar(year), palazzo(page=1), roe(page=1), billnelson(year=year),
|
42
|
-
document_query(page=1), document_query(page=2), swalwell(page=1),
|
43
|
-
vitter(year=year), inhofe(year=
|
42
|
+
document_query(page=1), document_query(page=2), swalwell(page=1), crapo, coburn, boxer(start=1),
|
43
|
+
vitter(year=year), inhofe(year=2014), fischer, clark(year=year), edwards, culberson_chabot_grisham(page=1), barton, wolf_sherman_mccaul, welch,
|
44
44
|
sessions(year=year), gabbard, pryor, ellison(page=0), costa, farr, mcclintock, olson, mcnerney].flatten
|
45
45
|
results = results.compact
|
46
46
|
Utils.remove_generic_urls!(results)
|
@@ -459,6 +459,7 @@ module Statement
|
|
459
459
|
results
|
460
460
|
end
|
461
461
|
|
462
|
+
# deprecated
|
462
463
|
def self.donnelly(year=Date.today.year)
|
463
464
|
results = []
|
464
465
|
url = "http://www.donnelly.senate.gov/newsroom/"
|
@@ -478,9 +479,11 @@ module Statement
|
|
478
479
|
domain = "www.inhofe.senate.gov"
|
479
480
|
doc = open_html(url)
|
480
481
|
return if doc.nil?
|
481
|
-
doc.xpath("//tr")[1..-1]
|
482
|
-
|
483
|
-
|
482
|
+
if doc.xpath("//tr")[1..-1]
|
483
|
+
doc.xpath("//tr")[1..-1].each do |row|
|
484
|
+
next if row.text.strip.size < 30
|
485
|
+
results << { :source => url, :url => row.children[3].children[0]['href'].strip, :title => row.children[3].text, :date => Date.strptime(row.children[1].text, "%m/%d/%y"), :domain => domain}
|
486
|
+
end
|
484
487
|
end
|
485
488
|
results
|
486
489
|
end
|
data/lib/statement/version.rb
CHANGED