statement 1.9.2 → 1.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/statement/scraper.rb +5 -6
- data/lib/statement/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bd1d3fcfc5790f5021df31165c8059ef04dec65
|
4
|
+
data.tar.gz: 98fc8e6c6a678918568c1545c90d221ecc9c3cfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60eb752db0720be576c879822f97f2cabb2532ece43eee49b3139c0d3343215018678c4c25288dbbef0ea3e29a7efde133d45d3456173d64d5b12812a29d807e
|
7
|
+
data.tar.gz: 04749de3ebf24adbfbeea66a673b5db9257bb6fe73f553acf7b9b5d2d8d5a8da123966597e232ff9c1f7daff5e35c6e00963a78c44f6aaee7f38b58847b532b2
|
data/lib/statement/scraper.rb
CHANGED
@@ -358,12 +358,11 @@ module Statement
|
|
358
358
|
results = []
|
359
359
|
base_url = "http://poe.house.gov"
|
360
360
|
month_url = base_url + "/press-releases?MonthDisplay=#{month}&YearDisplay=#{year}"
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
end
|
361
|
+
doc = open_html(month_url)
|
362
|
+
return if doc.nil?
|
363
|
+
doc.xpath("//tr")[1..-1].each do |row|
|
364
|
+
next if row.children[3].children[0].text.strip == 'Title'
|
365
|
+
results << { :source => month_url, :url => base_url + row.children[3].children[0]['href'], :title => row.children[3].children[0].text.strip, :date => Date.strptime(row.children[1].text, "%m/%d/%y"), :domain => "poe.house.gov" }
|
367
366
|
end
|
368
367
|
results
|
369
368
|
end
|
data/lib/statement/version.rb
CHANGED