yahoo_stock_splits 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/yahoo_stock_splits.rb +1 -1
- data/lib/yahoo_stock_splits/version.rb +1 -1
- metadata +3 -3
data/lib/yahoo_stock_splits.rb
CHANGED
@@ -9,7 +9,7 @@ module YahooStockSplits
|
|
9
9
|
re = /(.+)\[(\d+):(\d+)\]/
|
10
10
|
|
11
11
|
url = "http://finance.yahoo.com/q/bc?s=#{symbol}+Basic+Chart"
|
12
|
-
doc = Nokogiri::HTML(open(URI.parse(url)))
|
12
|
+
doc = Nokogiri::HTML(open(URI.parse(URI.encode(url))))
|
13
13
|
doc.css("center nobr").inject([]) do |splits, split|
|
14
14
|
md = re.match split
|
15
15
|
splits << [Date.parse(md[1]).strftime('%Y-%m-%d'), md[2].to_i, md[3].to_i] if md
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yahoo_stock_splits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 4
|
10
|
+
version: 1.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Javier Vidal
|