statement 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/statement/scraper.rb +4 -2
- data/lib/statement/version.rb +1 -1
- metadata +4 -4
data/lib/statement/scraper.rb
CHANGED
|
@@ -41,6 +41,7 @@ module Statement
|
|
|
41
41
|
results = [freshman_senators, capuano, cold_fusion(year, 0), conaway, susandavis, klobuchar, lujan, palazzo(page=1), billnelson(year=year),
|
|
42
42
|
document_query(page=1), document_query(page=2), farenthold(year), swalwell(page=1), donnelly(year=year), crapo, coburn, boxer(start=1), mccain(year=year),
|
|
43
43
|
vitter(year=year), inhofe(year=year), reid, fischer].flatten
|
|
44
|
+
results = results.compact
|
|
44
45
|
Utils.remove_generic_urls!(results)
|
|
45
46
|
end
|
|
46
47
|
|
|
@@ -287,8 +288,8 @@ module Statement
|
|
|
287
288
|
page_url = base_url + "documentquery.aspx?DocumentTypeID=1279&Page=#{page}"
|
|
288
289
|
doc = open_html(page_url)
|
|
289
290
|
return if doc.nil?
|
|
290
|
-
doc.xpath("//
|
|
291
|
-
results << { :source => page_url, :url => base_url + row.children
|
|
291
|
+
doc.xpath("//li")[41..50].each do |row|
|
|
292
|
+
results << { :source => page_url, :url => base_url + row.children[1]['href'], :title => row.children[1].children.text.strip, :date => Date.parse(row.children[3].text.strip), :domain => "conaway.house.gov" }
|
|
292
293
|
end
|
|
293
294
|
results
|
|
294
295
|
end
|
|
@@ -313,6 +314,7 @@ module Statement
|
|
|
313
314
|
return if doc.nil?
|
|
314
315
|
doc.xpath("//tr")[3..-1].each do |row|
|
|
315
316
|
next if row.text.strip == ''
|
|
317
|
+
next if row.children.children[1]['href'].nil?
|
|
316
318
|
results << { :source => base_url+'press.cfm?maxrows=200&startrow=1&&type=1', :url => base_url + row.children.children[1]['href'], :title => row.children.children[1].text.strip.split.join(' '), :date => Date.strptime(row.children.children[0].text, "%m/%d/%y"), :domain => "#{senator}.senate.gov" }
|
|
317
319
|
end
|
|
318
320
|
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: 1.0.
|
|
4
|
+
version: 1.0.12
|
|
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-
|
|
12
|
+
date: 2013-10-07 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:
|
|
217
|
+
hash: -2043584632715427142
|
|
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:
|
|
226
|
+
hash: -2043584632715427142
|
|
227
227
|
requirements: []
|
|
228
228
|
rubyforge_project:
|
|
229
229
|
rubygems_version: 1.8.25
|