statement 1.4 → 1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ module Statement
29
29
  end
30
30
 
31
31
  def self.member_methods
32
- [:capuano, :cold_fusion, :conaway, :chabot, :susandavis, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter, :donnelly, :inhofe, :levin, :reid, :palazzo, :roe, :document_query, :swalwell, :fischer]
32
+ [:capuano, :cold_fusion, :conaway, :chabot, :susandavis, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :vitter, :donnelly, :inhofe, :reid, :palazzo, :roe, :document_query, :swalwell, :fischer]
33
33
  end
34
34
 
35
35
  def self.committee_methods
@@ -39,7 +39,7 @@ module Statement
39
39
  def self.member_scrapers
40
40
  year = Date.today.year
41
41
  results = [freshman_senators, capuano, cold_fusion(year, 0), conaway, chabot, susandavis, klobuchar, lujan, palazzo(page=1), roe(page=1), billnelson(year=year),
42
- document_query(page=1), document_query(page=2), swalwell(page=1), donnelly(year=year), crapo, coburn, boxer(start=1), mccain(year=year),
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].flatten
44
44
  results = results.compact
45
45
  Utils.remove_generic_urls!(results)
@@ -48,7 +48,7 @@ module Statement
48
48
  def self.backfill_from_scrapers
49
49
  results = [cold_fusion(2012, 0), cold_fusion(2011, 0), cold_fusion(2010, 0), billnelson(year=2012), document_query(page=3),
50
50
  document_query(page=4), coburn(year=2012), coburn(year=2011), coburn(year=2010), boxer(start=11), boxer(start=21),
51
- boxer(start=31), boxer(start=41), mccain(year=2012), mccain(year=2011), vitter(year=2012), vitter(year=2011), swalwell(page=2), swalwell(page=3)
51
+ boxer(start=31), boxer(start=41), vitter(year=2012), vitter(year=2011), swalwell(page=2), swalwell(page=3)
52
52
  ].flatten
53
53
  Utils.remove_generic_urls!(results)
54
54
  end
@@ -300,7 +300,7 @@ module Statement
300
300
  url = base_url + "documentquery.aspx?DocumentTypeID=2508&Year=#{year}"
301
301
  doc = open_html(url)
302
302
  return if doc.nil?
303
- doc.xpath("//li")[38..43].each do |row|
303
+ doc.xpath("//li")[40..48].each do |row|
304
304
  results << { :source => url, :url => base_url + row.children[1]['href'], :title => row.children[1].children.text.strip, :date => Date.parse(row.children[3].text.strip), :domain => "chabot.house.gov" }
305
305
  end
306
306
  results
@@ -433,18 +433,6 @@ module Statement
433
433
  results
434
434
  end
435
435
 
436
- def self.mccain(year=Date.today.year)
437
- results = []
438
- url = "http://www.mccain.senate.gov/public/index.cfm?FuseAction=PressOffice.PressReleases&ContentRecordType_id=75e7e4a0-6088-44b6-8061-089d80513dc4&Region_id=&Issue_id=&MonthDisplay=0&YearDisplay=#{year}"
439
- domain = 'www.mccain.senate.gov'
440
- doc = open_html(url)
441
- return if doc.nil?
442
- doc.xpath("//li")[7..-1].each do |row|
443
- results << { :source => url, :url => "http://"+domain+'/public/'+row.children[3].children[1].children[4].children[0]['href'], :title => row.children[3].children[1].children[4].text, :date => Date.strptime(row.children[3].children[1].children[0].text, "%m/%d/%y"), :domain => domain}
444
- end
445
- results
446
- end
447
-
448
436
  def self.vitter(year=Date.today.year)
449
437
  results = []
450
438
  url = "http://www.vitter.senate.gov/newsroom/"
@@ -484,18 +472,6 @@ module Statement
484
472
  results
485
473
  end
486
474
 
487
- def self.levin(page=1)
488
- results = []
489
- url = "http://www.levin.senate.gov/newsroom/index.cfm?PageNum_rs=#{page}&section=press"
490
- domain = "www.levin.senate.gov"
491
- doc = open_html(url)
492
- return if doc.nil?
493
- doc.xpath('//tr').each do |row|
494
- results << { :source => url, :url => row.children[2].children[0]['href'].gsub(/\s+/, ""), :title => row.children[2].children[0].text, :date => Date.parse(row.children[0].text), :domain => domain}
495
- end
496
- results
497
- end
498
-
499
475
  def self.reid
500
476
  results = []
501
477
  url = "http://www.reid.senate.gov/newsroom/press_releases.cfm"
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.4"
2
+ VERSION = "1.5"
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.4'
4
+ version: '1.5'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-04 00:00:00.000000000 Z
12
+ date: 2013-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -214,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
214
  version: '0'
215
215
  segments:
216
216
  - 0
217
- hash: 1154048383946030559
217
+ hash: -2681532689604515141
218
218
  required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  none: false
220
220
  requirements:
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  segments:
225
225
  - 0
226
- hash: 1154048383946030559
226
+ hash: -2681532689604515141
227
227
  requirements: []
228
228
  rubyforge_project:
229
229
  rubygems_version: 1.8.25