statement 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/statement/scraper.rb +13 -5
- data/lib/statement/version.rb +1 -1
- metadata +16 -16
data/lib/statement/scraper.rb
CHANGED
@@ -29,7 +29,7 @@ module Statement
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def self.member_methods
|
32
|
-
[:capuano, :cold_fusion, :conaway, :susandavis, :faleomavaega, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter_cowan, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query]
|
32
|
+
[:capuano, :cold_fusion, :conaway, :susandavis, :faleomavaega, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter_cowan, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query, :farenthold]
|
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, susandavis, faleomavaega, klobuchar, lujan, palazzo(page=1), billnelson(year=year),
|
42
|
-
document_query(page=1), document_query(page=2), donnelly(year=year), lautenberg, crapo, coburn, boxer(start=1), mccain(year=year),
|
42
|
+
document_query(page=1), document_query(page=2), farenthold(year), donnelly(year=year), lautenberg, crapo, coburn, boxer(start=1), mccain(year=year),
|
43
43
|
vitter_cowan(year=year), inhofe(year=year), reid].flatten
|
44
44
|
Utils.remove_generic_urls!(results)
|
45
45
|
end
|
@@ -307,7 +307,7 @@ module Statement
|
|
307
307
|
|
308
308
|
def self.freshman_senators
|
309
309
|
results = []
|
310
|
-
['baldwin', '
|
310
|
+
['baldwin', 'hirono','heinrich','murphy','cruz'].each do |senator|
|
311
311
|
base_url = "http://www.#{senator}.senate.gov/"
|
312
312
|
doc = open_html(base_url+'press.cfm?maxrows=200&startrow=1&&type=1')
|
313
313
|
return if doc.nil?
|
@@ -513,8 +513,16 @@ module Statement
|
|
513
513
|
results.flatten
|
514
514
|
end
|
515
515
|
|
516
|
-
|
517
|
-
|
516
|
+
def self.farenthold(year=2013)
|
517
|
+
results = []
|
518
|
+
url = "http://farenthold.house.gov/index.php?flt_m=&flt_y=#{year}&option=com_content&view=article&id=1181&Itemid=100059&layout=default"
|
519
|
+
doc = open_html(url)
|
520
|
+
return if doc.nil?
|
521
|
+
doc.xpath("//div[@id='idGtReportDisplay']//li").each do |row|
|
522
|
+
results << { :source => url, :url => 'http://farenthold.house.gov'+row.children[0]['href'], :title => row.children[0].text.strip, :date => nil, :domain => "farenthold.house.gov"}
|
523
|
+
end
|
524
|
+
results
|
525
|
+
end
|
518
526
|
|
519
527
|
end
|
520
528
|
end
|
data/lib/statement/version.rb
CHANGED
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: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156248520 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.3'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156248520
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156247120 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156247120
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: webmock
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156245700 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156245700
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: american_date
|
49
|
-
requirement: &
|
49
|
+
requirement: &2156244580 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156244580
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: nokogiri
|
60
|
-
requirement: &
|
60
|
+
requirement: &2156243020 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156243020
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: koala
|
71
|
-
requirement: &
|
71
|
+
requirement: &2156242340 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2156242340
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: oj
|
82
|
-
requirement: &
|
82
|
+
requirement: &2156258140 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2156258140
|
91
91
|
description: Crawls congressional websites for press releases.
|
92
92
|
email:
|
93
93
|
- dwillis@gmail.com
|