statement 1.8.1 → 1.8.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 +16 -2
- 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: 153f8a6f76a24bb47cfb6dd93f8a47e2a270d468
|
4
|
+
data.tar.gz: f121e574afcd1bb4cf5c73d1e3d39d881fe39ab3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78f51417bb4cfa17caf14a499beec4f9ec7d864127224f6f3b334dbf46e3566c73c9fc972fe27f480b087532970c478814ce8996cdec81dbb7d00a103b3c2e4c
|
7
|
+
data.tar.gz: 7d5119de61de55979ebfebd21387c2c975d82a026c0a07aee9de577708021ba13b67572d054953310f697af39e6583ddff887d266bcfbeecffa455f3961a9bf5
|
data/lib/statement/scraper.rb
CHANGED
@@ -41,7 +41,7 @@ module Statement
|
|
41
41
|
results = [capuano, cold_fusion(year, 0), conaway, chabot, susandavis, klobuchar, lujan, palazzo(page=1), roe(page=1), billnelson(year=year),
|
42
42
|
document_query(page=1), document_query(page=2), swalwell(page=1), donnelly(year=year), crapo, coburn, boxer(start=1),
|
43
43
|
vitter(year=year), inhofe(year=year), reid, fischer, clark(year=year), edwards, culberson_chabot_grisham(page=1), barton, wolf_sherman_mccaul, welch,
|
44
|
-
sessions(year=year), gabbard].flatten
|
44
|
+
sessions(year=year), gabbard, pryor].flatten
|
45
45
|
results = results.compact
|
46
46
|
Utils.remove_generic_urls!(results)
|
47
47
|
end
|
@@ -50,7 +50,7 @@ module Statement
|
|
50
50
|
results = [cold_fusion(2012, 0), cold_fusion(2011, 0), cold_fusion(2010, 0), billnelson(year=2012), document_query(page=3),
|
51
51
|
document_query(page=4), coburn(year=2012), coburn(year=2011), coburn(year=2010), boxer(start=11), boxer(start=21),
|
52
52
|
boxer(start=31), boxer(start=41), vitter(year=2012), vitter(year=2011), swalwell(page=2), swalwell(page=3), clark(year=2013), culberson_chabot_grisham(page=2),
|
53
|
-
wolf_sherman_mccaul(page=1), sessions(year=2013)].flatten
|
53
|
+
wolf_sherman_mccaul(page=1), sessions(year=2013), pryor(page=1)].flatten
|
54
54
|
Utils.remove_generic_urls!(results)
|
55
55
|
end
|
56
56
|
|
@@ -578,6 +578,20 @@ module Statement
|
|
578
578
|
results.flatten
|
579
579
|
end
|
580
580
|
|
581
|
+
def self.pryor(page=0)
|
582
|
+
results = []
|
583
|
+
domain = 'www.pryor.senate.gov'
|
584
|
+
url = "http://www.pryor.senate.gov/newsroom/press-releases?page=#{page}"
|
585
|
+
doc = open_html(url)
|
586
|
+
return if doc.nil?
|
587
|
+
dates = doc.xpath('//span[@class="field-content"]').map {|s| s.text if s.text.strip.include?("201")}.compact!
|
588
|
+
doc.xpath('//div[@class="views-field views-field-title"]').each_with_index do |row, i|
|
589
|
+
date = Date.parse(dates[i])
|
590
|
+
results << {:source => url, :url => "http://www.pryor.senate.gov"+row.children[1].children[0]['href'], :title => row.children[1].children[0].text.strip, :date => date, :domain => domain}
|
591
|
+
end
|
592
|
+
results
|
593
|
+
end
|
594
|
+
|
581
595
|
def self.welch
|
582
596
|
results = []
|
583
597
|
domain = 'welch.house.gov'
|
data/lib/statement/version.rb
CHANGED