statement 1.8.5 → 1.8.6

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: 8507fe6ccc516ca85eaf17539359ffab87871b5d
4
- data.tar.gz: a336bbcb741177373d27b866084d4c436a05824c
3
+ metadata.gz: f777f657b5861f10eb1731a84ba45e85a7d2a401
4
+ data.tar.gz: 2c36d668c73097b0108ea0fa66d1a236c597f63c
5
5
  SHA512:
6
- metadata.gz: 1ad580d2022da5e53fc95d162d6c60aaab662cebf68c75d12f7f1f2c9fb5de12ce1f891b09194a790ba6204c263d8aca7b4335e6d8d90cef2d39fddaa9048302
7
- data.tar.gz: 62f7cf6ab93c7717a32bf2ed39817550469f6f5efccdccc66652523f41679649740273594fe6921ee17c38467ed33668318c010488026606d9f1eb0c89629fa9
6
+ metadata.gz: 5d58a345789e59a07f5aa4bab2f7c6ce369242b0fae9508df85565c0f0c0b67286eca88e4ba8119a64cf1227ebfcd295688c822c25af52ca8ed2b2022b5d0f74
7
+ data.tar.gz: 205ed57eb16bfab790ac6fa549e54efb79b76f49a777c3be5d05a4d673cff1245c81dd058f8190801110ff08c57897bb72876b5d61a5c1c558f81b2d01bd887c
@@ -262,22 +262,20 @@ module Statement
262
262
  results = []
263
263
  year = Date.today.year if not year
264
264
  month = 0 if not month
265
- domains = ['crenshaw.house.gov', 'www.ronjohnson.senate.gov/public/','www.moran.senate.gov/public/','www.risch.senate.gov/public/']
265
+ domains = ['crenshaw.house.gov', 'www.ronjohnson.senate.gov/public/','www.risch.senate.gov/public/']
266
266
  domains.each do |domain|
267
267
  if domain == 'crenshaw.house.gov' or domain == 'www.risch.senate.gov/public/'
268
268
  url = "http://"+domain + "/index.cfm/pressreleases?YearDisplay=#{year}&MonthDisplay=#{month}&page=1"
269
- elsif domain == 'www.moran.senate.gov/public/'
270
- url = "http://"+domain + "index.cfm/news-releases?YearDisplay=#{year}&MonthDisplay=#{month}&page=1"
271
269
  else
272
270
  url = "http://"+domain + "index.cfm/press-releases?YearDisplay=#{year}&MonthDisplay=#{month}&page=1"
273
271
  end
274
- doc = open_html(url)
272
+ doc = Statement::Scraper.open_html(url)
275
273
  return if doc.nil?
276
274
  doc.xpath("//tr")[2..-1].each do |row|
277
275
  date_text, title = row.children.map{|c| c.text.strip}.reject{|c| c.empty?}
278
276
  next if date_text == 'Date' or date_text.size > 10
279
277
  date = Date.parse(date_text)
280
- results << { :source => url, :url => row.children[2].children.first['href'], :title => title, :date => date, :domain => domain }
278
+ results << { :source => url, :url => row.children[3].children.first['href'], :title => title, :date => date, :domain => domain }
281
279
  end
282
280
  end
283
281
  results.flatten
@@ -1,3 +1,3 @@
1
1
  module Statement
2
- VERSION = "1.8.5"
2
+ VERSION = "1.8.6"
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.5
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Willis