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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5c984ab9de141e318bb79d62f9426565626bbf0
4
- data.tar.gz: 93e33b9da5548f6c765a85f0ac73b5becfddcd6d
3
+ metadata.gz: 153f8a6f76a24bb47cfb6dd93f8a47e2a270d468
4
+ data.tar.gz: f121e574afcd1bb4cf5c73d1e3d39d881fe39ab3
5
5
  SHA512:
6
- metadata.gz: 8cb295574961e7afa38ab5e5d5f894c19a06f7b19f743d1b9d7561d3e930c341b94d3960b6dc71eaa74fff2308520b6c07f4b9967bf1632448a0a19ef43e5157
7
- data.tar.gz: 53d79f12a6e7fb788069ee45bab96c693043ca9030b202cec925f47b45a18abd82e6e22a1b2376b0a72d98babc9e5265eaec3cdccc437c31eaaf031af22ae17d
6
+ metadata.gz: 78f51417bb4cfa17caf14a499beec4f9ec7d864127224f6f3b334dbf46e3566c73c9fc972fe27f480b087532970c478814ce8996cdec81dbb7d00a103b3c2e4c
7
+ data.tar.gz: 7d5119de61de55979ebfebd21387c2c975d82a026c0a07aee9de577708021ba13b67572d054953310f697af39e6583ddff887d266bcfbeecffa455f3961a9bf5
@@ -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'
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.8.1"
2
+ VERSION = "1.8.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statement
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Willis