Skip to content

Commit 7da7439

Browse files
committed
added fischer to member scrapers
1 parent 819d905 commit 7da7439

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

lib/statement/scraper.rb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def self.house_gop(url)
2929
end
3030

3131
def self.member_methods
32-
[:capuano, :cold_fusion, :conaway, :susandavis, :faleomavaega, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query, :farenthold, :swalwell]
32+
[:capuano, :cold_fusion, :conaway, :susandavis, :faleomavaega, :freshman_senators, :klobuchar, :lujan, :billnelson, :lautenberg, :crapo, :coburn, :boxer, :mccain, :vitter, :donnelly, :inhofe, :levin, :reid, :palazzo, :document_query, :farenthold, :swalwell, :fischer]
3333
end
3434

3535
def self.committee_methods
@@ -40,7 +40,7 @@ def self.member_scrapers
4040
year = Date.today.year
4141
results = [freshman_senators, capuano, cold_fusion(year, 0), conaway, susandavis, faleomavaega, klobuchar, lujan, palazzo(page=1), billnelson(year=year),
4242
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-
vitter(year=year), inhofe(year=year), reid].flatten
43+
vitter(year=year), inhofe(year=year), reid, fischer].flatten
4444
Utils.remove_generic_urls!(results)
4545
end
4646

@@ -392,6 +392,18 @@ def self.crapo
392392
end
393393
results
394394
end
395+
396+
def self.fischer(year=Date.today.year)
397+
results = []
398+
url = "http://www.fischer.senate.gov/public/index.cfm/press-releases?MonthDisplay=0&YearDisplay=#{year}"
399+
doc = open_html(url)
400+
return if doc.nil?
401+
doc.xpath("//tr")[2..-1].each do |row|
402+
next if row.text[0..3] == "Date"
403+
results << { :source => url, :url => row.children[2].children[0]['href'], :title => row.children[2].text.strip, :date => Date.strptime(row.children[0].text.strip, "%m/%d/%y"), :domain => "fischer.senate.gov" }
404+
end
405+
results
406+
end
395407

396408
def self.coburn(year=Date.today.year)
397409
results = []

0 commit comments

Comments
 (0)